I try to install Pandas library uisg pip3 and get the following errors:
ERROR: Command errored out with exit status 1:
command: /Users/chaklader/PycharmProjects/OptimizingPublicTransport/producers/venv/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/k4/q3psbyqj0l79b8ch527mr36h0000gp/T/pip-install-brdwlohn/pandas_7fb71e5a5c944478a4b18f60d65daa50/setup.py'"'"'; __file__='"'"'/private/var/folders/k4/q3psbyqj0l79b8ch527mr36h0000gp/T/pip-install-brdwlohn/pandas_7fb71e5a5c944478a4b18f60d65daa50/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/k4/q3psbyqj0l79b8ch527mr36h0000gp/T/pip-wheel-1lu27a0t
cwd: /private/var/folders/k4/q3psbyqj0l79b8ch527mr36h0000gp/T/pip-install-brdwlohn/pandas_7fb71e5a5c944478a4b18f60d65daa50/
Complete output (938 lines):
/usr/local/opt/python#3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9/cpython/unicodeobject.h:551:1: note: 'PyUnicode_FromUnicode' has been explicitly marked deprecated here
Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_FromUnicode(
^
/usr/local/opt/python#3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
#define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
^
14 warnings and 4 errors generated.
error: command '/usr/bin/clang' failed with exit code 1
----------------------------------------
ERROR: Failed building wheel for pandas
Running setup.py clean for pandas
Failed to build pandas
Installing collected packages: pandas
Attempting uninstall: pandas
Whats the issue here and how to resolve it?
My guess is you're using a too high python version, see similar issues 1 2.
You can try python 3.6. You should always upgrade pip before installing packages.
And as you can see in the pip install log, it tries to compile from some C/C++ source, requiring the build tools which are sometimes unavailable.
So I suggest you use anaconda, from wiki:
Anaconda is a distribution of the Python and R programming languages
for scientific computing (data science, machine learning applications,
large-scale data processing, predictive analytics, etc.), that aims to
simplify package management and deployment.
Related
I am attempting to install web3 on my windows machine. I am using the Visual studio code terminal to do this. I have used both commands.
pip install web3
pip3 install web3
The first error I was getting was around the Visual studios build tools which I was able to install. Now when I run the command I get this error.
ERROR: Command errored out with exit status 1: 'C:\Python310\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\ealvarado\\AppData\\Local\\Temp\\pip-install-nfyoy3t_\\cytoolz_9d52991e4515405886466c30cd8781ec\\setup.py'"'"'; __file__='"'"'C:\\Users\\ealvarado\\AppData\\Local\\Temp\\pip-install-nfyoy3t_\\cytoolz_9d52991e4515405886466c30cd8781ec\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\ealvarado\AppData\Local\Temp\pip-record-g88od3fy\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Python310\Include\cytoolz' Check the logs for full command output.
WARNING: Ignoring invalid distribution -ip (c:\python310\lib\site-packages)
WARNING: Ignoring invalid distribution -ip (c:\python310\lib\site-packages)
WARNING: Ignoring invalid distribution -ip (c:\python310\lib\site-packages)
WARNING: You are using pip version 21.2.3; however, version 21.3 is available.
You should consider upgrading via the 'C:\Python310\python.exe -m pip install --upgrade pip' command.
the WARNING: Ignoring invalid distribution -ip (c:\python310\lib\site-packages) is because at some point in time pip failed to delete some temporary folder that it make while updating or installing or something, to get rip of it just go to the folder listed and delete the folders which name start with ~.
The other warning is for you to upgrade your pip, you should do that.
And for the error, I don't know, maybe that library don't support python 3.10 yet and that is why it fail and/or your outdated pip don't fetch the most current version by virtue of being outdated
folks. When I attempt to run
poetry install --no-root
I receive an error when poetry attempts to resolve the pandas dependency:
n file included from pandas/_libs/lib.c:666:
pandas/_libs/src/parse_helper.h:141:26: error: implicit declaration of function 'tolower_ascii' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
for (; *p; ++p) *p = tolower_ascii(*p);
^
1 warning and 1 error generated.
error: command '/usr/bin/clang' failed with exit code 1
----------------------------------------
ERROR: Command errored out with exit status 1: /Users/jamesnebeker/.virtualenvs/company/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/2y/46hhmqpd5vs5vh1pghd_nn9r0000gp/T/pip-install-s60fjeom/pandas_2b30bf547347406991c0eac0a8670786/setup.py'"'"'; __file__='"'"'/private/var/folders/2y/46hhmqpd5vs5vh1pghd_nn9r0000gp/T/pip-install-s60fjeom/pandas_2b30bf547347406991c0eac0a8670786/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/2y/46hhmqpd5vs5vh1pghd_nn9r0000gp/T/pip-record-w_pe6_s4/install-record.txt --single-version-externally-managed --compile --install-headers /Users/jamesnebeker/.virtualenvs/company/include/site/python3.9/pandas Check the logs for full command output.
This is on macOS Big Sur. I have no idea what could be causing this issue and can't find anything about it online. Any help would be greatly appreciated.
I ran into the same problem yesterday, but when building an older version of pandas from source (v0.24.2). I think this error is a mismatch between a newer compiler or Python and older pandas code. From searching around it looks like this error isn't entirely new, it was previously a warning so compilation still completed.
Presuming you were trying to build an old version, either upgrade to something newer, or build manually and apply the changes in this commit (as I had to do).
https://github.com/pandas-dev/pandas/commit/1f7ef05ef4e2e5b72763d8f32d79e3495c364d35
I'm trying to set up a django project on my local. I've created a virtualenv. when I try install the requirements with:
pip install -r requirements.txt
I'm getting an error:
ERROR: Command errored out with exit status 1:
command: 'D:\Work\Web Development - Old\PullStream\django\evcs-fe\venv\Scripts\python.exe' -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\lachi\\AppData\\Local\\Temp\\pip-install-847c5ux0\\django-multi-captcha-admin_1ab73ac1a6d14606bffcc9cca96b88bf\\setup.py'"'"';
__file__='"'"'C:\\Users\\lachi\\AppData\\Local\\Temp\\pip-install-847c5ux0\\django-multi-captcha-admin_1ab73ac1a6d14606bffcc9cca96b88bf\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\lachi\AppData\Local\Temp\pip-pip-egg-info-ocge_4v4'
cwd: C:\Users\lachi\AppData\Local\Temp\pip-install-847c5ux0\django-multi-captcha-admin_1ab73ac1a6d14606bffcc9cca96b88bf\
Complete output (2 lines):
error in django-multi-captcha-admin setup command: use_2to3 is invalid.
warning: pypandoc module not found, could not convert Markdown to RST
----------------------------------------
ERROR: Could not find a version that satisfies the requirement django-multi-captcha-admin==1.0.0 (from versions: 1.0.0)
ERROR: No matching distribution found for django-multi-captcha-admin==1.0.0
How can I fix this? any suggestions?
This issue tell you that pip repository can't find the (exact) version of the plugin you want install.
A workaround is too modify the requirements.txt file and take a more generic approach like this :
Instead of pip-plugin-name==version-number
do pip-plugin-name , this will install the most up to date version of this plugin hosted on pip server.
In your case : replace django-multi-captcha-admin==1.0.0 by django-multi-captcha-admin in the requirements.txt file.
If any version of this plugin is present on pip server, it will be installed.
I am new to python. I am trying to execute my project but I am encountering some sort of error which is mentioned below while doing pip install -r requirements-local.txt
I created virtual environment using virtualenv -p python3 venv and activated it using source venv/bin/activate command. Then I try to install dependancy using pip install -r requirements-local.txt which throws error
Some part of the error :
Building wheels for collected packages: psycopg2
Building wheel for psycopg2 (setup.py) ... error
and
Running setup.py install for psycopg2 ... error
ERROR: Command errored out with exit status 1:
command: /Users/akshaysalekar/Documents/Projects/lambda-patch-ats/venv/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/cy/cgz3qm196wg_h0wfdgh4clkr0000gn/T/pip-install-zss21x7x/psycopg2_0948f735c8ed42f6b38b42db053c4168/setup.py'"'"'; __file__='"'"'/private/var/folders/cy/cgz3qm196wg_h0wfdgh4clkr0000gn/T/pip-install-zss21x7x/psycopg2_0948f735c8ed42f6b38b42db053c4168/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/cy/cgz3qm196wg_h0wfdgh4clkr0000gn/T/pip-record-cmz8fx78/install-record.txt --single-version-externally-managed --compile --install-headers /Users/akshaysalekar/Documents/Projects/lambda-patch-ats/venv/include/site/python3.9/psycopg2
cwd: /private/var/folders/cy/cgz3qm196wg_h0wfdgh4clkr0000gn/T/pip-install-zss21x7x/psycopg2_0948f735c8ed42f6b38b42db053c4168/
Complete output (141 lines):```
I am using Macbook pro (macOS Big Sur). My python version is 3.9.6 , pip verison is pip 21.2.2.
My requirement file has only two dependencies which are
psycopg2==2.7.7
boto3==1.9.100
I have tried upgrading outdated package, Installing wheel package and reinstalling python and updating pip but no luck.
Can someone please help me in this.
Thank you
Edit : The complete error message is pasted here;
https://pastebin.com/raw/M9viR8fU
Trying to download PyAudio by pip install PyAudio but this isn't working. I'm using Python 3.9.5
also tried python -m pip install pyaudio but it didn't work. Anyone having the same error??
help me solve this error please...
see the code below for reference ↓
Collecting PyAudio
Using cached PyAudio-0.2.11.tar.gz (37 kB)
Building wheels for collected packages: PyAudio
Building wheel for PyAudio (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\keepa\appdata\local\programs\python\python39\python.exe' -u
-c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\keepa\\AppData\\Local\\Temp\\pip-install-e979x4nc\\pyaudio_403fcffb6b004552a1d48ac0e0876dd8\\setup.py'"'"';
__file__='"'"'C:\\Users\\keepa\\AppData\\Local\\Temp\\pip-install-e979x4nc\\pyaudio_403fcffb6b004552a1d48ac0e0876dd8\\setup.py'"'"';f
= getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\keepa\AppData\Local\Temp\pip-wheel-trp3euxd'
cwd: C:\Users\keepa\AppData\Local\Temp\pip-install-e979x4nc\pyaudio_403fcffb6b004552a1d48ac0e0876dd8\
Complete output (9 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
copying src\pyaudio.py -> build\lib.win-amd64-3.9
running build_ext
building '_portaudio' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
----------------------------------------
ERROR: Failed building wheel for PyAudio
Running setup.py clean for PyAudio
Failed to build PyAudio
Installing collected packages: PyAudio
Running setup.py install for PyAudio ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\keepa\appdata\local\programs\python\python39\python.exe' -u
-c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\keepa\\AppData\\Local\\Temp\\pip-install-e979x4nc\\pyaudio_403fcffb6b004552a1d48ac0e0876dd8\\setup.py'"'"';
__file__='"'"'C:\\Users\\keepa\\AppData\\Local\\Temp\\pip-install-e979x4nc\\pyaudio_403fcffb6b004552a1d48ac0e0876dd8\\setup.py'"'"';f
= getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\keepa\AppData\Local\Temp\pip-record-isa75oeg\install-record.txt'
--single-version-externally-managed --compile --install-headers 'c:\users\keepa\appdata\local\programs\python\python39\Include\PyAudio'
cwd: C:\Users\keepa\AppData\Local\Temp\pip-install-e979x4nc\pyaudio_403fcffb6b004552a1d48ac0e0876dd8\
Complete output (9 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
copying src\pyaudio.py -> build\lib.win-amd64-3.9
running build_ext
building '_portaudio' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\keepa\appdata\local\programs\python\python39\python.exe' -u
-c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\keepa\\AppData\\Local\\Temp\\pip-install-e979x4nc\\pyaudio_403fcffb6b004552a1d48ac0e0876dd8\\setup.py'"'"';
__file__='"'"'C:\\Users\\keepa\\AppData\\Local\\Temp\\pip-install-e979x4nc\\pyaudio_403fcffb6b004552a1d48ac0e0876dd8\\setup.py'"'"';f
= getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\keepa\AppData\Local\Temp\pip-record-isa75oeg\install-record.txt'
--single-version-externally-managed --compile --install-headers 'c:\users\keepa\appdata\local\programs\python\python39\Include\PyAudio' Check the logs for full command output.
When running python 3.6 this works, but with python 3.7 it doesn't.
PyAudio only supports up to python 3.6:
pip will fetch and install PyAudio wheels (prepackaged binaries). Currently, there are wheels compatible with the official distributions of Python 2.7, 3.4, 3.5, and 3.6.
The workarounds would be to use a supported version of python, or to build and install manually - if the latter, you'll need to make sure you have the correct libraries installed and configured.
I should point out that PyAudio appears to be deprecated. It hasn't received an update since March 2017. Therefore I recommend you find another package for this.
Same problem due to the absence of Microsoft compiler that i didn't want to install on my PC.
I used this website unofficial pre-compiled pyaudio wheel packages, it worked well. So download wheel files at this site:
https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyaudio
Of course, download the wheel version that is compatible with your python version.
use the command:
pip install wheel_file_downloaded
pip install pipwin
python -m pipwin install pyaudio