ERROR: Command errored out with exit status 1: 'e:\python\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\mmusa\\AppData\\Local\\Temp\\pip-install-z5zd5j52\\numpy\\setup.py'"'"'; __file__='"'"'C:\\Users\\mmusa\\AppData\\Local\\Temp\\pip-install-z5zd5j52\\numpy\\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\mmusa\AppData\Local\Temp\pip-record-wre2z2vk\install-record.txt' --single-version-externally-managed --prefix 'C:\Users\mmusa\AppData\Local\Temp\pip-build-env-zf5z8fdj\overlay' --compile --install-headers 'C:\Users\mmusa\AppData\Local\Temp\pip-build-env-zf5z8fdj\overlay\Include\numpy' Check the logs for full command output.
----------------------------------------
ERROR: Command errored out with exit status 1: 'e:\python\python.exe' 'e:\python\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\mmusa\AppData\Local\Temp\pip-build-env-zf5z8fdj\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel scikit-build cmake pip 'numpy==1.11.3; python_version=='"'"'3.5'"'"'' 'numpy==1.13.3; python_version=='"'"'3.6'"'"'' 'numpy==1.14.5; python_version=='"'"'3.7'"'"'' 'numpy==1.17.3; python_version>='"'"'3.8'"'"'' Check the logs for full command output.
I get this error while installing opencv. I have upgraded my pip and I am currently using Python 3.9. Any help would be appreciated
Note the opencv project readme does not yet state support for Python 3.9
Supported Python versions Python 3.x compatible pre-built wheels are
provided for the officially supported Python versions (not in EOL):
3.6
3.7
3.8
Without prebuilt wheels, you'll need to build it yourself. Make sure you have proper build tools installed on your system.
Also note:
on Windows, make sure you have Visual C++ redistributable 2015
installed. If you are using older Windows version than Windows 10 and
latest system updates are not installed, Universal C Runtime might be
also required.
Alternatively, you can try downloading an unofficial wheel for opencv (and other dependencies) for Python 3.9 and installing from wheel files
Python 3.9 is supported in the latest version of opencv.
source
right now openCV is not supporting python 3.9
its better to use earlier version of python, like 3.5 so everything is in original and stable
I had the same problem here for downloading modern machine learning libraries(TensorFlow, sci-kit learn)So saw the TensorFlow documentation(official) it was indicating that we should python 3.3-3.8 for installing. I tried that and fortunately, it worked. Hope it works for you! So according to me, you should also install python 3.8
I hope this would help.
sudo apt update
sudo apt install python3-pip
pip3 install opencv-python
Related
I am trying to pip install the package "skimage" on my Ubuntu VM to analyze structural similarity of images with scikit-image. But I always get a strange error. I already tried to install it with conda but it didn't succeeded either. Conda seems to know just "scikit-image" but not "skimage". The required packages like numpy, matplotlib, ... are installed and upgraded already.
My input:
pip3 install skimage
the error:
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-k9rh2ebf/skimage/setup.py'"'"'; __file__='"'"'/tmp/pip-install-k9rh2ebf/skimage/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-k9rh2ebf/skimage/pip-egg-info
cwd: /tmp/pip-install-k9rh2ebf/skimage/
Complete output (3 lines):
*** Please install the `scikit-image` package (instead of `skimage`) ***
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Thanks for your help!
You can install it using
pip install -U scikit-image or this pip install scikit-image
Look in to the documentation In order to install it you need to use the following command
pip install scikit-image
if you want to install it using the word skimage
sudo apt-get install python-skimage
Finally after a lot of trying I figured out it had to do with my virtual machine I was using. In the prebuilt Ubuntu image for VirtualBox I downloaded, something seems to be wrong with the installation paths.
Setting up a native Ubuntu (without VM) solved the problem for me. The skimage library is empty and only points to the sicikit-image library and is normally installed with the installation of scikit-image (which didn't work because of the VM).
Now on my native ubuntu everything works as it should.
pip install pyaudio
Giving error,
ERROR: Command errored out with exit status 1: 'c:\users\admin\appdata\local\programs\python\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\admin\AppData\Local\Temp\pip-install-q34_lfl5\pyaudio\setup.py'"'"'; file='"'"'C:\Users\admin\AppData\Local\Temp\pip-install-q34_lfl5\pyaudio\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\admin\AppData\Local\Temp\pip-record-q8jvhxle\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\admin\appdata\local\programs\python\python38-32\Include\pyaudio' Check the logs for full command output.
Regards,
Neha
I had the same problem. you should install pyaudio offline.
First, download the whl file from here then install it.
pip install <downloaded file here>
In my case:
pip install PyAudio-0.2.11-cp36-cp36m-win_amd64.whl
Windows wheels are the most popular packages for nearly all modern Python versions, including the latest PyAudio.
please attention, you should download the version is capable with your system. If you got error like this:
ERROR: PyAudio-0.2.11-cp39-cp39-win32.whl is not a supported wheel on this platform.
try another file until installing successfully.
PyAudio
Includes ASIO, DS, WMME, WASAPI, WDMKS support.
PyAudio‑0.2.11‑cp39‑cp39‑win_amd64.whl
PyAudio‑0.2.11‑cp39‑cp39‑win32.whl
PyAudio‑0.2.11‑cp38‑cp38‑win_amd64.whl
PyAudio‑0.2.11‑cp38‑cp38‑win32.whl
PyAudio‑0.2.11‑cp37‑cp37m‑win_amd64.whl #this version worked for me
PyAudio‑0.2.11‑cp37‑cp37m‑win32.whl
PyAudio‑0.2.11‑cp36‑cp36m‑win_amd64.whl
PyAudio‑0.2.11‑cp36‑cp36m‑win32.whl
...
Check out this answer too.
Go to website and download the version of pyaudio as per your Python version from here.
Browse the directory where the file is downloaded.
Open command prompt there
Type command pip install <filename.extension> in my case pip install PyAudio-0.2.11-cp36-cp36m-win_amd64.whl
It will install
Comment if facing issues in above process.
your python version is 3.7 or obove Try
pip install pipwin
pipwin install pyaudio
I am running ubuntu 16. I have both python 2.7 and 3.5 installed. I want to install cx_freeze latest version for python3. I downloaded the package from their website but couldn't run the setup.py file as it always gave me errors. Also i have installed pip3, but it still doesn't work for me. all the answers online are for older version of cx_freeze so a fresh answer for the new version will be helpful.
I install and upgrade pip3 with:
sudo -H install --upgrade pip
then I try to install cx_freeze with:
pip3 install cx_Freeze .
then i get the following errors:
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-ngco46uq/cx-Freeze/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-q3n3cd2r-record/install-record.txt --single-version-externally-managed --compile"
failed with error code 1 in /tmp/pip-build-ngco46uq/cx-Freeze/
also anyone can tell me any other method to do so ?
Try installing Pip3 using :
sudo apt-get install python3-pip
If you have Python 2.7, you can try alternatives like py2exe
Not sure whats going on here but I am getting an error every time I try to install something using pip I get the following error:
Command "/usr/bin/python -c "import setuptools, tokenize;__file__='/private/var/folders/b0/5843zgyj1yz3b8q2l7wrtj8h0000gn/T/pip-build-V4hy8S/PySocks/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/b0/5843zgyj1yz3b8q2l7wrtj8h0000gn/T/pip-bIOl7C-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/b0/5843zgyj1yz3b8q2l7wrtj8h0000gn/T/pip-build-V4hy8S/PySocks
Try
sudo pip install -U setuptools
If this doesn't solve your problem then
Firstly, you need the python-dev package because Pillow needs compile headers defined.
sudo apt-get install python-dev
On Ubuntu 14.04 you need few extra packages to get pillow working. Install all of them with the command:
sudo apt-get install libtiff5-dev libjpeg8-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python-tk
Seems that your PiP can't access Setuptools as per the "import setuptools" in the error. Try the below first then try running your pip install again.
sudo pip install -U setuptools
Solution from Github Issue
Launch the command prompt with 'run as administrator' rights before installing.
then try the script -
pip install package_name_here
if error is thrown,then import setup tools
pip install -U setuptools
if again error thrown then upgrade your pip installer using this script(personally worked for me)
python -m pip install --upgrade pip
I had the same problem on Windows Git Bash but installing setuptools did not fix it. Then I noticed another error message further up:
building 'twisted.test.raiser' extension error: Microsoft Visual C++ 14.0 is
required. Get it with "Microsoft Visual C++ Build Tools":
http://landinghub.visualstudio.com/visual-cpp-build-tools
That link was dead but ultimately this page had a link to the correct download: https://wiki.python.org/moin/WindowsCompilers
I installed Microsoft Build Tools for Visual Studio 2017 and that resolved it.
It majorly depends on the type of packages you suppose to install.
Frequently its failing due to the missing of
libsasl2-dev a package for authentication abstraction library which use in the Ubuntu version
First, install:
sudo apt-get install libsasl2-dev
then run:
pip install <<\package_name>>
first run as superuser:
sudo su
then :
pip install PyOpenGL PyOpenGL_accelerate
If you get this error on Windows, like I did, then just run the command-line tool (cmd.exe or Powershell) as Administrator and try again.
I have Python 2.7.9 on windows 7 64-bits. I'm trying to install scipy using pip. I used pip install scipy but I get the following error :
Command "C:\Python27\python.exe -c "import setuptools, tokenize;__file__='c:\\us
ers\\admin\\appdata\\local\\temp\\pip-build-xpl5cw\\scipy\\setup.py';exec(compil
e(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file
__, 'exec'))" install --record c:\users\admin\appdata\local\temp\pip-b68pfc-reco
rd\install-record.txt --single-version-externally-managed --compile" failed with
error code 1 in c:\users\admin\appdata\local\temp\pip-build-xpl5cw\scipy
I searched on google and stackoverflow for solutions but nothing worked. I tried upgrading pip and it didn't work too.
Here are my installed packages and their versions :
httplib2 (0.9.1)
nltk (3.0.3)
nose (1.3.7)
numpy (1.9.2)
pip (7.0.3)
pytz (2015.4)
scikit-learn (0.16.1)
setuptools (17.1.1)
six (1.9.0)
twilio (4.4.0)
wheel (0.24.0)
I'm on Ubuntu 14.04. I tried installing through pip which kept on failing with error code 1 or took forever to finish (never finished actually!).
However, the following command worked without a hitch:
sudo apt-get install python-numpy python-scipy python-matplotlib ipython ipython-notebook python-pandas python-sympy python-nose
Reference: http://www.scipy.org/install.html
On Windows, you'll need to use the unofficial precompiled binaries:
http://www.lfd.uci.edu/~gohlke/pythonlibs/
Select the version matching your architecture and Python version.
Installing setuptools made it work for me (Mac OS)
pip install -U pip setuptools
I also had the same error when installing scipy.
Then I downloaded and installed MiniConda. And then I used the below command to install pytables.
conda install -c conda-forge scipy
Please refer the below screenshot.
On windows you can check below command:
python -m pip install psycopg2