lexpredict-lexnlp icon indicating copy to clipboard operation
lexpredict-lexnlp copied to clipboard

How to install lexnlp in python 3.8

Open ojhamanvi opened this issue 5 years ago • 10 comments

numpy.distutils.system_info.NotFoundError: no lapack/blas resources found

Rolling back uninstall of scipy Moving to /home/user/python_projects/test/venv/lib/python3.8/site-packages/scipy->1.4.1.dist-info/ from /home/user/python_projects/test/venv/lib/python3.8/site-packages/~cipy-1.4.1.dist-> info Moving to /home/user/python_projects/test/venv/lib/python3.8/site-packages/scipy/ from /home/user/python_projects/test/venv/lib/python3.8/site-packages/~cipy

Command "/home/user/python_projects/test/venv/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-install-fcs98xlz/scipy/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-record-ara2_jj3/install-record.txt --single-version-externally-managed --compile --install-headers /home/user/python_projects/test/venv/include/site/python3.8/scipy" failed with error code 1 in /tmp/pip-install-fcs98xlz/scipy/

ojhamanvi avatar Apr 04 '20 11:04 ojhamanvi

I tried these two command to install

sudo apt-get -y install liblapack-dev libblas-dev sudo apt-get install -y gfortran

but after this I am getting Command "/home/user/python_projects/test/venv/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-i3n2kydy/scipy/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-3r293kif/install-record.txt --single-version-externally-managed --compile --install-headers /home/user/python_projects/test/venv/include/site/python3.8/scipy" failed with error code 1 in /tmp/pip-install-i3n2kydy/scipy/

ojhamanvi avatar Apr 04 '20 13:04 ojhamanvi

I tried installing SciPy manually first, but no luck with that either. Mac OS X 10.15

davenquinn avatar Apr 26 '20 02:04 davenquinn

I tried installing SciPy manually first, but no luck with that either. Mac OS X 10.15

At last I downgraded my numpy version and downloaded the zip file of lexnlp and changed the version of Scipy. after that it was installed, but that's really a bad process.

ojhamanvi avatar May 31 '20 13:05 ojhamanvi

ERROR: Command errored out with exit status 1: /opt/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/26/g_95706542x2gqythmq_rxgm0000gn/T/pip-install-6e64k72s/scipy/setup.py'"'"'; file='"'"'/private/var/folders/26/g_95706542x2gqythmq_rxgm0000gn/T/pip-install-6e64k72s/scipy/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/var/folders/26/g_95706542x2gqythmq_rxgm0000gn/T/pip-record-dmills_s/install-record.txt --single-version-externally-managed --compile --install-headers /opt/anaconda3/include/python3.7m/scipy Check the logs for full command output.

shauryauppal avatar Jul 14 '20 17:07 shauryauppal

Not able to install at Python3.7 Anaconda

shauryauppal avatar Jul 14 '20 17:07 shauryauppal

I was able to fix it by making a conda environment of python 3.6 and installing the corresponding scipy version, conda create -n py36 python=3.6 conda install -n py36 scipy==1.0.0 conda activate py36 pip install lexnlp

nayan-mehta avatar Jul 16 '20 04:07 nayan-mehta

I was able to fix it by making a conda environment of python 3.6 and installing the corresponding scipy version, conda create -n py36 python=3.6 conda install -n py36 scipy==1.0.0 conda activate py36 pip install lexnlp

But we cannot use conda on server, and moreover this issue is for python 3.8 not for python 3.6

ojhamanvi avatar Jul 16 '20 09:07 ojhamanvi

But we cannot use conda on server, and moreover this issue is for python 3.8 not for python 3.6

Sorry about that mine was in response to @shauryauppal who was looking for a workaround with conda, that's how i was able to get mine up and running.

nayan-mehta avatar Jul 16 '20 18:07 nayan-mehta

I tried a bunch of things and it just does not work. To add to that misery, changing between python versions on a Mac is a living nightmare. However, https://apple.stackexchange.com/questions/329187/homebrew-rollback-from-python-3-7-to-python-3-6-5-x/399577#399577 is a good resource for any iOS owners landing here.

For some reason pyenv isn't working for me, so I had to

  • uninstall virtualenv (downloaded from py3.7)

  • install py 3.6.5 and link that to python3 symlink

  • install openssl again (but not 1.1 because latest upgrade of brew has moved to v1.1 bec that's what py 37 and 38 depend on however 36 needs . Follow the instructions here: v1.0 https://github.com/kelaberetiv/TagUI/issues/635)

  • reinstall virtualenv and I finally have a clean working install.

@davenquinn and @ojhamanvi you might find this helpful.

DhanshreeA avatar Aug 18 '20 20:08 DhanshreeA

Hi Y'all, I tried to install lexnlp using the approach described above i.e.: conda create -n py36 python=3.6 conda install -n py36 scipy==1.0.0 conda activate py36 pip install lexnlp

It seemed to install (no errors) but when I tried to use this: import LexNLP I got this error:

ModuleNotFoundError Traceback (most recent call last) in ----> 1 import LexNLP

ModuleNotFoundError: No module named 'LexNLP'

Any ideas on what I can do? Thank you!!

theiman112860 avatar Sep 22 '21 20:09 theiman112860