Collecting spacy<2.2,>=2.1
Using cached spacy-2.1.9.tar.gz (30.7 MB)
Installing build dependencies ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\vignesh\appdata\local\programs\python\python38\python.exe' 'c:\users\vignesh\appdata\local\programs\python\python38\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\Vignesh\AppData\Local\Temp\pip-build-env-9opljrjo\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools 'wheel>0.32.0,<0.33.0' Cython 'cymem>=2.0.2,<2.1.0' 'preshed>=2.0.1,<2.1.0' 'murmurhash>=0.28.0,<1.1.0' 'thinc>=7.0.8,<7.1.0'
Try to run
pip install --upgrade setuptools
Then
pip install --upgrade chatterbot
If that doesn't work then check if you are using 32 bit Python. Spacy has dropped support for 32 bit and so you'll need to use 64 bit Python.
Related
I am trying install scipy in FreeBSD 13. I have built python 3.10 on FreebSD 13 and managed to install pandas, matplotlib and numpy on a virtual environment which has python 3.10. However, when I try to install sklearn or scipy I get an error saying scipy could not be installed.
Here it is below for when doing pip install scipy. I get the same error more or less when trying to install sklearn.
ERROR: Failed building wheel for scipy
Failed to build scipy
ERROR: Could not build wheels for scipy, which is required to install pyproject.toml-based projects
Command errored out with exit status 1: /home/schroter/.pymain/dataViz/bin/python3 /tmp/pip-standalone-pip-d3nnvp2f/__env_pip__.zip/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-xp_669rf/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel 'Cython>=0.28.5' 'oldest-supported-numpy; python_version!='"'"'3.7'"'"' or platform_machine=='"'"'aarch64'"'"' or platform_system=='"'"'AIX'"'"' or platform_python_implementation == '"'"'PyPy'"'"'' 'numpy==1.14.6; python_version=='"'"'3.7'"'"' and platform_machine!='"'"'aarch64'"'"' and platform_system!='"'"'AIX'"'"' and platform_python_implementation != '"'"'PyPy'"'"'' 'scipy>=1.1.0' Check the logs for full command output.
My pip list is as below:
(dataViz) schroter#SCHROTER:~ % pip list
Package Version
---------------- -------
cycler 0.11.0
kiwisolver 1.1.0
matplotlib 3.4.3
numpy 1.21.4
pandas 1.3.4
Pillow 8.4.0
pip 21.3.1
pyparsing 3.0.6
python-dateutil 2.8.2
pytz 2021.3
semantic-version 2.8.5
setuptools 58.5.3
setuptools-rust 0.12.1
six 1.16.0
toml 0.10.2
wheel 0.37.0
Would anyone be able to help me in this regards please?
Thanks & Best Regards
Schroter
Reuse system package
# install system-wide version in site-packages
doas pkg install py38-scipy-1.8.0
# create a virtualenv with site-packages included
python -m venv --system-site-packages .venv
Drawback is you'll get all packages from site-packages, however you can tackle that by
doas pkg install py38-scipy-1.8.0
python -m venv .venv
YOUR_PYTHON_VERSION= SET IT HERE
ln -s $(python -c 'import lxml, os.path; print(os.path.dirname(lxml.__file__)') ./.venv/lib/$YOUR_PYTHON_VERSION/site-packages
borrowed from https://stackoverflow.com/a/13719417
Regular Installation (TODO)
Haven't figured out it yet, but maybe someone else will, so putting here 2 links which might be helpful
https://forums.freebsd.org/threads/python-scipy-with-python3-x-on-freebsd-11.59009/
https://reviews.freebsd.org/D23447
Have you tried to install scipy from freebsd ports? The freebsd ports contain patches to make the code compile on FreeBSD.
I am trying to create a python environment on a server that is not connected to the public internet, so i have downloaded and transfered all the neccessary packages to the server and trying to install with the following command python3 -m pip install --no-index --find-links=opt/executor/xxx/ packagename
So my question is that when i try to install python-dateutil-2.7.5.tar.gz
im getting the below output saying that setuptools is not installed even though it is installed.
Would you know how i can fix this issue?
Python 3.6.13 is installed on a linux machine
[root#cdddd xx]# python3 -m pip install --no-index --find-links=opt/executor/xxx/ python-dateutil-2.7.5.tar.gz
Looking in links: opt/executor/xxx/
Processing ./python-dateutil-2.7.5.tar.gz
Installing build dependencies ... error
Complete output from command /usr/local/bin/python3 -m pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-v5h9rus9 --no-warn-script-location --no-binary :none: --only-binary :none: --no-index --find-links opt/executor/xxx/ -- setuptools>=38.2.5 wheel:
Looking in links: opt/executor/xxx/
Collecting setuptools>=38.2.5
Url 'opt/executor/xxx/' is ignored. It is either a non-existing path or lacks a specific scheme.
Could not find a version that satisfies the requirement setuptools>=38.2.5 (from versions: )
No matching distribution found for setuptools>=38.2.5
----------------------------------------
Command "/usr/local/bin/python3 -m pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-v5h9rus9 --no-warn-script-location --no-binary :none: --only-binary :none: --no-index --find-links opt/executor/xxx/ -- setuptools>=38.2.5 wheel" failed with error code 1 in None
Setuptool install
[root#ddd7 xx]# python3 -m pip install --no-index --find-links=opt/executor/xxx/ setuptools-38.2.5.zip
Looking in links: opt/executor/xxx/
Processing ./setuptools-38.2.5.zip
Installing collected packages: setuptools
Found existing installation: setuptools 38.2.5
Uninstalling setuptools-38.2.5:
Successfully uninstalled setuptools-38.2.5
Running setup.py install for setuptools ... done
Successfully installed setuptools-38.2.5
Fist I had lots of problems installing numpy library on a new Mac book M1. (mostly with pep517) and finally I installed it using python3 -m pip install --no-binary :all: --no-use-pep517 numpy==1.20rc1 command and now,
when I try to install pandas (with pip3) library, I face a long list of errors:
Installing build dependencies ... error
ERROR: Command errored out with exit status 1:
command: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pip install --ignore-installed --no-user --prefix .....)
File "/private/var/folders/5_/ct_h64s936q91wl1qyv28l040000gn/T/pip-build-env-pxjl8ilr/overlay/lib/python3.9/site-packages/wheel/bdist_wheel.py", line 278, in get_tag
assert tag in supported_tags, "would build wheel with unsupported tag {}".format(tag)
AssertionError: would build wheel with unsupported tag ('cp39', 'cp39', 'macosx_11_0_universal2')
########### EXT COMPILER OPTIMIZATION ###########
Platform :
Architecture: unsupported
Compiler : gcc
CPU baseline :
Requested : optimization disabled
Enabled : none
Flags : none
Extra checks: none
Requested : optimization disabled
CPU dispatch :
Enabled : none
Generated : none
CCompilerOpt._cache_write[796] : write cache to path -> /private/var/folders/5_/ct_h64s936q91wl1qyv28l040000gn/T/pip-install-85rdftyx/numpy_6356c8e2cabc49c4a1a96e499bcbb920/build/temp.macosx-10.9-universal2-3.9/ccompiler_opt_cache_ext.py
########### CLIB COMPILER OPTIMIZATION ###########
Platform :
Architecture: unsupported
Compiler : gcc
CPU baseline :
Requested : optimization disabled
Enabled : none
Flags : none
Extra checks: none
Requested : optimization disabled
CPU dispatch :
Enabled : none
Generated : none
CCompilerOpt._cache_write[796] : write cache to path -> /private/var/folders/5_/ct_h64s936q91wl1qyv28l040000gn/T/pip-install-85rdftyx/numpy_6356c8e2cabc49c4a1a96e499bcbb920/build/temp.macosx-10.9-universal2-3.9/ccompiler_opt_cache_clib.py
----------------------------------------
ERROR: Failed building wheel for numpy
Failed to build numpy
ERROR: Could not build wheels for numpy which use PEP 517 and cannot be installed directly
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/78/e4/a935f1701fac697c6c5458f86968bec5d2b4cb66e7f738225216ebaa20b4/pandas-1.2.2.tar.gz#sha256=14ed84b463e9b84c8ff9308a79b04bf591ae3122a376ee0f62c68a1bd917a773 (from https://pypi.org/simple/pandas/) (requires-python:>=3.7.1). Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pip install --ignore-installed --no-user --prefix /private/var/folders/5_/ct_h64s936q91wl1qyv28l040000gn/T/pip-build-env-77vprpke/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel 'Cython>=0.29.21,<3' 'numpy==1.16.5; python_version=='"'"'3.7'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.17.3; python_version=='"'"'3.8'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.16.5; python_version=='"'"'3.7'"'"' and platform_system=='"'"'AIX'"'"'' 'numpy==1.17.3; python_version=='"'"'3.8'"'"' and platform_system=='"'"'AIX'"'"'' 'numpy; python_version>='"'"'3.9'"'"'' Check the logs for full command output.
Using cached pandas-1.2.1.tar.gz (5.5 MB)
Installing build dependencies ... -^canceled
ERROR: Operation cancelled by user
How can I install pandas??
other libraries like scipy also face similar errors (some errors about clang.
i solved the problem using arch x86_64 pip3 install <package>
Apparently arm64's M1 doesn't support some python libraries yet!
I used homebrew to install python and numpy, but got the same error message when trying to install pandas using pip.
I could get pandas to work installing it from source (https://github.com/pandas-dev/pandas/releases)
Unzip the downloaded file and navigate to the root folder.
pip3 install cython
python3 setup.py install
I solved this by following the steps on this link:
https://laict.medium.com/install-python-on-macos-11-m1-apple-silicon-using-pyenv-12e0729427a9
Allowed me to install pyenv via homebrew and pyenv install python 3.8.6. once that was installed I was able to pip install everything I needed (including numpy and pandas which I have seen many other people have issues with). However, I previously tried to do all of this with 3.7.10 but ran into some issues similar to yours.
Im still unsure how to install python3.7 on mac M1 unfortunately.
So, while installing spacy, I have got this error
ERROR: Command errored out with exit status 1: 'c:\users\user\appdata\local\programs\python\python37-32\python.exe' 'c:\users\user\appdata\local\programs\python\python37-32\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\User\AppData\Local\Temp\pip-build-env-n0y5abli\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel 'cython>=0.25' 'cymem>=2.0.2,<2.1.0' 'preshed>=3.0.2,<3.1.0' 'murmurhash>=0.28.0,<1.1.0' thinc==7.4.1 Check the logs for full command output.
command: 'c:\users\user\appdata\local\programs\python\python37-32\python.exe' 'c:\users\user\appdata\local\programs\python\python37-32\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\User\AppData\Local\Temp\pip-build-env-4cphnz1x\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel 'cython>=0.25' 'cymem>=2.0.2,<2.1.0' 'preshed>=3.0.2,<3.1.0' 'murmurhash>=0.28.0,<1.1.0' thinc==7.4.1
cwd: None
Complete output (65 lines):
Collecting setuptools
Using cached setuptools-50.3.0-py3-none-any.whl (785 kB)
Collecting wheel
Using cached wheel-0.35.1-py2.py3-none-any.whl (33 kB)
Collecting cython>=0.25
Using cached Cython-0.29.21-cp37-cp37m-win32.whl (1.5 MB)
Collecting cymem<2.1.0,>=2.0.2
Using cached cymem-2.0.3.tar.gz (51 kB)
Collecting preshed<3.1.0,>=3.0.2
Using cached preshed-3.0.2.tar.gz (167 kB)
Collecting murmurhash<1.1.0,>=0.28.0
Using cached murmurhash-1.0.2.tar.gz (35 kB)
Collecting thinc==7.4.1
Using cached thinc-7.4.1.tar.gz (1.3 MB)
Collecting blis<0.5.0,>=0.4.0
Using cached blis-0.4.1.tar.gz (1.8 MB)
Collecting wasabi<1.1.0,>=0.0.9
Using cached wasabi-0.8.0-py3-none-any.whl (23 kB)
Collecting srsly<1.1.0,>=0.0.6
Using cached srsly-1.0.2.tar.gz (192 kB)
Collecting catalogue<1.1.0,>=0.0.7
Using cached catalogue-1.0.0-py2.py3-none-any.whl (7.7 kB)
Collecting numpy>=1.7.0
Using cached numpy-1.19.2-cp37-cp37m-win32.whl (10.9 MB)
Collecting plac<1.2.0,>=0.9.6
Using cached plac-1.1.3-py2.py3-none-any.whl (20 kB)
Collecting tqdm<5.0.0,>=4.10.0
Using cached tqdm-4.50.2-py2.py3-none-any.whl (70 kB)
Collecting importlib-metadata>=0.20; python_version < "3.8"
Using cached importlib_metadata-2.0.0-py2.py3-none-any.whl (31 kB)
Collecting zipp>=0.5
Using cached zipp-3.3.0-py3-none-any.whl (5.3 kB)
Using legacy 'setup.py install' for cymem, since package 'wheel' is not installed.
Using legacy 'setup.py install' for preshed, since package 'wheel' is not installed.
Using legacy 'setup.py install' for murmurhash, since package 'wheel' is not installed.
Using legacy 'setup.py install' for thinc, since package 'wheel' is not installed.
Using legacy 'setup.py install' for blis, since package 'wheel' is not installed.
Using legacy 'setup.py install' for srsly, since package 'wheel' is not installed.
Installing collected packages: setuptools, wheel, cython, cymem, murmurhash, preshed, numpy, blis, wasabi, srsly, zipp, importlib-metadata, catalogue, plac, tqdm, thinc
Running setup.py install for cymem: started
Running setup.py install for cymem: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: 'c:\users\user\appdata\local\programs\python\python37-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\User\\AppData\\Local\\Temp\\pip-install-ur6uxv4r\\cymem\\setup.py'"'"'; __file__='"'"'C:\\Users\\User\\AppData\\Local\\Temp\\pip-install-ur6uxv4r\\cymem\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\User\AppData\Local\Temp\pip-record-lp67dha5\install-record.txt' --single-version-externally-managed --prefix 'C:\Users\User\AppData\Local\Temp\pip-build-env-4cphnz1x\overlay' --compile --install-headers 'C:\Users\User\AppData\Local\Temp\pip-build-env-4cphnz1x\overlay\Include\cymem'
cwd: C:\Users\User\AppData\Local\Temp\pip-install-ur6uxv4r\cymem\
Complete output (18 lines):
WARNING: The wheel package is not available.
running install
running build
running build_py
creating build
creating build\lib.win32-3.7
creating build\lib.win32-3.7\cymem
copying cymem\about.py -> build\lib.win32-3.7\cymem
copying cymem\__init__.py -> build\lib.win32-3.7\cymem
package init file 'cymem\tests\__init__.py' not found (or not a regular file)
creating build\lib.win32-3.7\cymem\tests
copying cymem\tests\test_import.py -> build\lib.win32-3.7\cymem\tests
copying cymem\cymem.pyx -> build\lib.win32-3.7\cymem
copying cymem\cymem.pxd -> build\lib.win32-3.7\cymem
copying cymem\__init__.pxd -> build\lib.win32-3.7\cymem
running build_ext
building 'cymem.cymem' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
I am using the last Python 3.7.
Working on Windows 10.
Python is 64 bit.
I don't know what to do.
Also, I tried to reinstall Python, run cmd as admin, but it gives me the same error.
I also tried to search for the same problem but didn't find anything.
Help.
This result when installing (trying to install packages from source instead of binary wheels in windows) means that you're running 32-bit python and not 64-bit python.
Double-check that the python in your virtual environment is really 64-bit python. You can inspect sys.maxsize to check -- it should be 9223372036854775807. Use python -m pip instead of just pip to be sure you're installing for the right venv for the python version that you just checked.
I am trying to install the twint library into a conda virtual environment. I have to use pip because the library is not at the conda or conda forge channels. twint requires Python 3.6, so I created a new virtual environment with that version. I created that environment following Anaconda's instructions:
conda create --name py36 python=3.6
Again following Anaconda's instructions, I install pip to that environment. A weird thing, I believe, happens here, which is that I am told pip is already installed.
MacBook-Pro-89:~ Zack$ conda install -n py36 pip
Using Anaconda Cloud api site https://api.anaconda.org
Fetching package metadata .........
Solving package specifications: ..........
# All requested packages already installed.
# packages in environment at /Users/Zack/anaconda/envs/py36:
#
pip 20.0.2 py_2 conda-forge
Whether I check my pip version (which -a pip) from the py36 environment or not, I am shown the following:
(py36) MacBook-Pro-89:~ Zack$ which -a pip
/Users/Zack/anaconda/bin/pip
/Users/Zack/anaconda/bin/pip
/Users/Zack/anaconda/bin/pip
/Users/Zack/anaconda/bin/pip
/Library/Frameworks/Python.framework/Versions/2.7/bin/pip
If I try to install twint, it errors out at multidict. The error message is very long, so below I show the top and bottom, which shows something about Python 3.5.
ERROR: Command errored out with exit status 1:
command: /Users/Zack/anaconda/bin/python /Users/Zack/anaconda/lib/python3.5/site-packages/pip install --ignore-installed --no-user --prefix /private/var/folders/56/sdxbs4_x1xlgyb_9vg9mkn300000gn/T/pip-build-env-exnpi3i_/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'pip>=18' 'setuptools>=40' wheel
cwd: None
[DELETED BY ME FOR THIS ANSWER]
ERROR: Command errored out with exit status 1: /Users/Zack/anaconda/bin/python /Users/Zack/anaconda/lib/python3.5/site-packages/pip install --ignore-installed --no-user --prefix /private/var/folders/56/sdxbs4_x1xlgyb_9vg9mkn300000gn/T/pip-build-env-exnpi3i_/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'pip>=18' 'setuptools>=40' wheel Check the logs for full command output.
I have tried with pip3 as well, same error.
I have also tried cloning the twint project from github and installing using the requirements file, but I get a similar error to what I'm seeing already:
ERROR: Package 'twint' requires a different Python: 3.5.2 not in '>=3.6.0'
I do not think it is a PYTHONPATH issue, as I don't believe I ever set it.
MacBook-Pro-89:~ Zack$ echo $PYTHONPATH
MacBook-Pro-89:~ Zack$ source activate py36
(py36) MacBook-Pro-89:~ Zack$ echo $PYTHONPATH
(py36) MacBook-Pro-89:~ Zack$
I am pretty sure that I do not have pip in the py36 environment I created, which somehow means it tries using Python 3.5. What I don't understand is that I do have pip in a py35 environment I created. I also do not have this problem on a remote desktop I use, where again pip does exist in the Python 3.6 environment. So there is something funky going on with my py36 environment on my laptop.
Based on the helpful comments below, I have tried the following but also to no avail. See the comments for my responses.
install -y python=3.6 pip conda
which pip
/Users/Zack/anaconda/bin/pip
python -m pip twint
/Users/Zack/anaconda/envs/py36/bin/python: No module named pip
I am using a 2016 Macbook Pro with OS X El Capitan. xcode is updated.
What am I doing wrong?!?! Why won't this work?!?!
I see you are having troubles installing pip. An alternative way of installing pip is through get-pip.py
https://pip.pypa.io/en/stable/installing/
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python get-pip.py
Now you can use pip install
python -m pip install pip --upgrade
python -m pip install twint