I have installed pip3 successfully but whenever i try to install a package it comes up with this error(on macos high sierra terminal):
libsuinput/src/suinput.c:25:10: fatal error: 'linux/limits.h' file not found
#include <linux/limits.h>
^
1 error generated.
error: command 'gcc' failed with exit status 1
and
ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/_4/bc_4xmsn63vb8kt8t5_g1wqm0000gn/T/pip-install-hby05qne/python-uinput/setup.py'"'"'; __file__='"'"'/private/var/folders/_4/bc_4xmsn63vb8kt8t5_g1wqm0000gn/T/pip-install-hby05qne/python-uinput/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/_4/bc_4xmsn63vb8kt8t5_g1wqm0000gn/T/pip-record-xlhm8d89/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.
Can anyone help?
Edit: it returns the same error using normal pip
Solved. Package i was trying to install was not compatible with MacOS.
Python 2 is installed by default on Apple computers(check by $ python --version), but if you need Python 3 then you can use following steps-
Install Xcode and Homebrew. For Xcode do this-$ xcode-select --install.
Then install homebrew /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
To confirm Homebrew installed correctly, run this command: $ brew doctor
Install Python 3. Do this - $ brew install python3
Lastly, check your python version by $ python3 --version
Related
I am trying to Install firebase-admin on Termux using this command :
pip install firebase-admin
Python Version :
$ python -V
Python 3.9.1
Pip version :
$ pip -V
pip 20.3.1 from /data/data/com.termux/files/usr/lib/python3.9/site-packages/pip (python 3.9)
Installation Fails with this error :
ASM Builds for BoringSSL currently not supported on: linux-aarch64
Also , tried with Python 2.7 still, facing the Same Issue. Any Workarounds ?
Full StackTrace :
ERROR: Command errored out with exit status 1: /data/data/com.termux/files/usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/data/data/com.termux/files/usr/tmp/pip-install-btbtn_ga/grpcio_154dc9427ab04d429a4c3b2c56c107fa/setup.py'"'"'; __file__='"'"'/data/data/com.termux/files/usr/tmp/pip-install-btbtn_ga/grpcio_154dc9427ab04d429a4c3b2c56c107fa/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /data/data/com.termux/files/usr/tmp/pip-record-1tz_62k3/install-record.txt --single-version-externally-managed --compile --install-headers /data/data/com.termux/files/usr/include/python3.9/grpcio Check the logs for full command output.
I've successfully installed firebase-admin by downgrading setuptools and installing an older version of grpcio.
$ sudo pip3 uninstall setuptools
$ sudo pip3 install setuptools==49.6.0
$ sudo pip3 install grpcio==1.31.0
$ sudo pip3 firebase-admin
tested on pico-pi-imx7d board running ubuntu 20.04 LTS, with Python 3.8.5 and pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8) installed.
upon running pip install trains in my virtual env
I am getting
ERROR: Command errored out with exit status 1:
command: /home/epdadmin/noam/code/venv_linux/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-owzh8lnl/retrying/setup.py'"'"'; __file__='"'"'/tmp/pip-install-owzh8lnl/retrying/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-lxz5t8pu/install-record.txt --single-version-externally-managed --compile --install-headers /home/epdadmin/noam/code/venv_linux/include/site/python3.8/retrying
cwd: /tmp/pip-install-owzh8lnl/retrying/
Complete output (10 lines):
running install
running build
running build_py
creating build
creating build/lib
copying retrying.py -> build/lib
running install_lib
copying build/lib/retrying.py -> /home/epdadmin/noam/code/venv_linux/lib/python3.8/site-packages
byte-compiling /home/epdadmin/noam/code/venv_linux/lib/python3.8/site-packages/retrying.py to retrying.cpython-38.pyc
error: [Errno 13] Permission denied: '/home/epdadmin/noam/code/venv_linux/lib/python3.8/site-packages/__pycache__/retrying.cpython-38.pyc.139678407381360'
----------------------------------------
ERROR: Command errored out with exit status 1: /home/epdadmin/noam/code/venv_linux/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-owzh8lnl/retrying/setup.py'"'"'; __file__='"'"'/tmp/pip-install-owzh8lnl/retrying/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-lxz5t8pu/install-record.txt --single-version-externally-managed --compile --install-headers /home/epdadmin/noam/code/venv_linux/include/site/python3.8/retrying Check the logs for full command output.
I know that I am not supposed to run under sudo when using a venv, so I don't really understand the problem
running for example pip install pandas does work.
Python 3.8
How to install trains?
EDIT:
running pip install trains --user or pip install --user trains gives
ERROR: Can not perform a '--user' install. User site-packages are not visible in this virtualenv.
You have two options:
Create a virtual environment and install your packages inside it (preferred)
Install your packages inside your user home directory by passing --user flag
pip install --user
The problem was a permissions problem for the venv.
Another problem was trains required some packages that were not yet available with wheels on Python3.8, so I had to downgrade Python to 3.7
That venv was created using Pycharm, and for some reason it was created with low permissions.
There was probably a way to elevate its permissions, but instead I just deleted it and created another one using command line by
python -m virtualenv --python=/usr/bin/python3.7 venv
And now pip install trains worked.
Very annoying.
I had the same error with installing matplotlib in Ubuntu 18.
Running these lines worked for me:
sudo apt-get install python3-dev
apt-get install build-essential
As found on setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
I am installing the latest Grakn client python with this command:
pip3 install grakn-client
However after a while during the install I get this error:
ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/j4/85rb7q1n55l950cyxc5h57n80000gn/T/pip-install-jx_f2vss/grpcio/setup.py'"'"'; file='"'"'/private/var/folders/j4/85rb7q1n55l950cyxc5h57n80000gn/T/pip-install-jx_f2vss/grpcio/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/j4/85rb7q1n55l950cyxc5h57n80000gn/T/pip-record-yi2uyn5w/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/grpcio Check the logs for full command output.
I am using Python 3.8 and Grakn 1.8.3
For mac m1 setting variables worked for me, Used the following command:
CFLAGS="-I /opt/homebrew/opt/openssl/include" LDFLAGS="-L /opt/homebrew/opt/openssl/lib" GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=1 GRPC_PYTHON_BUILD_SYSTEM_ZLIB=1 pip pip3 install grakn-client
I think there's a problem using the Grakn Python client 1.8.1 with Python 3.8.x, so please downgrade your Python to 3.7 or lower for now - this issue should be fixed soon.
I ran this command:
pip install numcodecs
And I got this error:
Error: Command errored out with exit status 1: 'c:\users\sunit\appdata\local\programs\python\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\sunit\\AppData\\Local\\Temp\\pip-install-419pmst9\\numcodecs\\setup.py'"'"'; __file__='"'"'C:\\Users\\sunit\\AppData\\Local\\Temp\\pip-install-419pmst9\\numcodecs\\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\sunit\AppData\Local\Temp\pip-record-5lw96050\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\sunit\appdata\local\programs\python\python38\Include\numcodecs' Check the logs for full command output.
What do I do?
I had the same error (trying to install zarr module, with the error coming from installing numcodecs). I was able to resolve it by updating my OSX to the newest version (Catalina), which then led to me reinstalling anaconda, Xcode, and previous Python packages from scratch. After doing that,
pip install numcodecs
still failed with the same error. However,
conda install numcodecs
or in my case:
conda install zarr
worked without error. It seems to have something to do with a conflict between Xcode tools and pip installer, which conda overcomes. My colleague was likewise unable to install via pip but could install via conda and a virtual environment on the first try, a faster option to try first before reinstalling everything.
Brief discussion of the issue on Github here.
I was trying to install rasa in win10 but it always shows the error for httptools set-up
ERROR: Command errored out with exit status 1: 'c:\users\sandy\appdata\local\programs\python\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\sandy\\AppData\\Local\\Temp\\pip-install-5y1502t_\\httptools\\setup.py'"'"'; __file__='"'"'C:\\Users\\sandy\\AppData\\Local\\Temp\\pip-install-5y1502t_\\httptools\\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\sandy\AppData\Local\Temp\pip-record-dg9lglte\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.
I also faced the same issue in windows 10 and after research, i found its a python installation issue in windows 10.
steps to resolve the issue:
Please uninstall non-relavent python from windows 10.(else create python virtual environment).
Please install chocolatey in windows 10 using - https://chocolatey.org/docs/installation#installing-chocolatey link.
Open cmd as admin and run below with specific python version
choco install python3 --version 3.6.5
ref - https://chocolatey.org/packages/python3/3.6.5
Verify your environment variable have a new Python installation path.
open new cmd and type python and verify the version.
on cmd run - pip install rasa.
it's better to create a virtual environment and do development there and follow above steps.
Go to new folder and open cmd .
pip3 install -U pip virtualenv (folder name).
type - .\venv\Scripts\activate.
pip install --upgrade pip.
Source - https://www.tensorflow.org/install/pip