I'm trying to install objccheckstyle with this command:
sudo pip install objccheckstyle
But it fails after it says
Running setup.py install for lxml
and I get this error:
Command "/usr/bin/python -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-DsaKIL/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-CFc6EG-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/tmp/pip-build-DsaKIL/lxml
I also tried sudo pip install lxml, but it looks like it fails when tries to import libxml:
#include "libxml/xmlversion.h"
I don't find libxml with pip install. What could I be missing?
Thanks
Updating to the latest Xcode's command line tools solved the problem.
Related
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-build-9rd60o0h/kivy/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-h2wevr4m-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-9rd60o0h/kivy/
Error code 1 is "permission denied" - most likely, as you're on Ubuntu, I'd guess you're trying to install the module globally. Either
pip install --user kivy to install is into your user's local environment, or
sudo pip install kivy to install it globally, as root
I am trying to install Scipy on my computer. I did it by using the command pip install Scipy. (pip & numpy are up-to-date and I am using Python 3.6) I also tried it with Pycharm, but it didn't worked either.
I always do get this Error:
Command
"c:\users***\appdata\local\programs\python\python36\python.exe -u -c
"import setuptools,
tokenize;file='C:\Users\***\AppData\Local\Temp\pip-build-x3s21920\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 C:\Users***\AppData\Local\Temp\pip-gr9ppj_q-record\install-record.txt
--single-version-externally-managed --compile" failed with error code 1 in C:\Users***\AppData\Local\Temp\pip-build-x3s21920\scipy\
Does anyone has an idea of what I can do?
Try to install it from the following binaries
http://www.lfd.uci.edu/~gohlke/pythonlibs/
These are unofficial precompiled binaries
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-J1I0ox/pymssql/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-qmtdBW-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/tmp/pip-build-J1I0ox/pymssql/
I am having the same error as displayed here . I followed the instructions on that page by trying brew install freetds followed by sudo -H pip install pymssql.
That generates this error code:
_mssql.c:18814:15: error: use of undeclared identifier 'DBVERSION_80'
__pyx_r = DBVERSION_80;
^
4 warnings and 1 error generated.
error: command 'cc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-J1I0ox/pymssql/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-qmtdBW-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/tmp/pip-build-J1I0ox/pymssql/
Searching this error brought me to this page. I followed the solution posted there by trying both brew unlink freetds; brew install homebrew/versions/freetds091 and brew uninstall freetds; brew install homebrew/versions/freetds091 which generates a different error when trying sudo -H pip install pymssql:
_mssql.c:266:10: fatal error: 'sqlfront.h' file not found
#include "sqlfront.h"
^
1 error generated.
error: command 'cc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/_s/27xppw4j3yl78c9l4v1w3n9m0000gn/T/pip-build-97A9sQ/pymssql/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/_s/27xppw4j3yl78c9l4v1w3n9m0000gn/T/pip-0nUZo4-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/_s/27xppw4j3yl78c9l4v1w3n9m0000gn/T/pip-build-97A9sQ/pymssql/
So then I gave up and tried to install pyodbc, but I still get similar errors: src/pyodbc.h:56:10: fatal error: 'sql.h' file not found
#include sql.h
Any help with this would be great.
This link ended up solving my problem. For anyone else having these issues, this sequence of commands worked for me.
brew uninstall --force freetds
brew install freetds#0.91
brew link --force freetds#0.91
pip install pymssql
As of Feb 2021
I can no longer install freetds#0.91 as homebrew does not have it available. The current version of freetds is 1.2.18 and brew link --force freetds doesn't seem to change anything.
The root issue 'sqlfront.h' file not found is due to the freetds files not linking properly during installation. We can fix this by doing
export LDFLAGS="-L/opt/homebrew/opt/freetds/lib"
export CPPFLAGS="-I/opt/homebrew/opt/freetds/include"
pip install pymssql
Where /opt/homebrew/opt/freetds is where homebrew installed freetds on your system (I am on Apple Silicon) and may be different for you. If you are on Intel your's might look something like /usr/local/opt/freetds.
To find exactly where homebrew installed freetds (or any program for that matter) on your system, you can do
brew --prefix freetds
This should return something like /opt/homebrew/opt/freetds or /opt/homebrew/opt/freetds#1.2.18. You can ignore any version numbers and append /lib and /include to get the paths you need.
This is a handy trick to keep in mind as it is applicable to lots of other install issues with dependencies installed via homebrew.
I'm trying to get pip (3.6) to install the packages thrift-sasl, thrift-py and impyla, on CentOS 6, and I keep getting this error.
Command "/usr/bin/python3.6 -u -c "import setuptools, tokenize;file='/tmp/pip-build-rv4_laqv/thriftpy/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-hogvggj3-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-rv4_laqv/thriftpy/
Things I have tried
Updating pip
Installing/updating setuptools
yum install gcc-c++ python-devel.x86_64 cyrus-sasl-devel.x86_64
Any suggestions or insights?
I try to use pip install psycopg2 on windows10 and python3.5, but it show me below error message. how can i fix it ?
Command
"d:\desktop\learn\python\webcatch\appserver\webcatch\scripts\python.exe
-u -c "import setuptools, tokenize;file='C:\Users\16022001\AppData\Local\Temp\pip-build-rsorislh\psycopg2\setup.py';exec(compile(getattr(tokenize,
'open', open)(file).read().replace('\r\n', '\n'), file,
'exec'))" install --record
C:\Users\16022001\AppData\Local\Temp\pip-kzsbvzx9-record\install-record.txt
--single-version-externally-managed --compile --install-headers d:\desktop\learn\python\webcatch\appserver\webcatch\include\site\python3.5\psycopg2"
failed with error code 1 in
C:\Users\16022001\AppData\Local\Temp\pip-build-rsorislh\psycopg2\
pip install psycopg this worked for me, don't mention version i.e (pip install psycopg2)