LexPredict / lexpredict-lexnlp

LexNLP by LexPredict
GNU Affero General Public License v3.0
703 stars 179 forks source link

How to install lexnlp in python 3.8 #37

Open ojhamanvi opened 4 years ago

ojhamanvi commented 4 years ago

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 commented 4 years ago

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/

davenquinn commented 4 years ago

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

ojhamanvi commented 4 years ago

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.

shauryauppal commented 4 years ago

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 commented 4 years ago

Not able to install at Python3.7 Anaconda

nayan-mehta commented 4 years ago

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

ojhamanvi commented 4 years ago

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

nayan-mehta commented 4 years ago

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.

DhanshreeA commented 4 years ago

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

@davenquinn and @ojhamanvi you might find this helpful.

theiman112860 commented 3 years ago

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!!