note: I am on linux(ubuntu,mint)
I am trying to install jupyter. But after some searching I realised that the error I have when trying to install jupyter is due to notebook.
So here is the error I have when trying to install notebook using sudo pip install notebook.
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-EKmj0F/scandir/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-OB5xPr-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-EKmj0F/scandir/
If you want here is the whole output of pip install notebook.
Thank for answers in advance.
This is the relevant part of the error message:
_scandir.c:14:20: fatal error: Python.h: No such file or directory
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
You need the Python headers:
sudo apt-get install python-dev
Your installation process tries to compile an extension with gcc and you seem to be missing the necessary decencies.
Related
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 have been trying to install seaborn through cmd without using Anaconda with the following command : pip install seaborn. I run this command in the cmd in the directory C:\Python27\Scripts and i get this error :
Command "c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\
\users\\user\\appdata\\local\\temp\\pip-build-ira6iy\\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\user\appdata\l
ocal\temp\pip-wzz50c-record\install-record.txt --single-version-externally-manag
ed --compile" failed with error code 1 in c:\users\user\appdata\local\temp\pip-b
uild-ira6iy\scipy\
Any help would be appreciated!
Download the wheel here and type pip install seaborn‑0.7.1‑py2.py3‑none‑any.whl it should be easier for you search for it here: http://www.lfd.uci.edu/~gohlke/pythonlibs/
Although as cryptic as the error was did you install SciPy first? That's all I can gather as possibly missing pip install scipy
I have Ubuntu 14.04 LTS with Python 2.7.6, and I want to install cx_Freeze. I used the command:
pip install cx_Freeze
and I got the error:
fatal error: Python.h: No such file or directory compilation terminated.
so I did:
sudo apt-get install python-dev
but now I'm getting:
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_emanuele/cx-Freeze/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-Hd6_EY-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_emanuele/cx-Freeze
Storing debug log for failure in /home/emanuele/.pip/pip.log
what does it mean this error and how can I fix it?
I have been trying to figure out what the problem was for installing this module for a while and I'm stuck. The only related link I could find is here. I type in the command sudo -E pip3 install networkit into the terminal and here is what I am getting.
g++: error: unrecognized command line option '-Qunused-arguments'
g++: error: unrecognized command line option '-Qunused-arguments'
error: command 'g++' failed with exit status 1
----------------------------------------
Command "/Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5 -c "import setuptools, tokenize;__file__='/private/var/folders/9n/zhnv69nd7sv9fj9gsg64c1p00000gp/T/pip-build-l15ye4xm/networkit/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/9n/zhnv69nd7sv9fj9gsg64c1p00000gp/T/pip-25ou5_op-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/9n/zhnv69nd7sv9fj9gsg64c1p00000gp/T/pip-build-l15ye4xm/networkit
I was able to install all the python packages mentioned here using pip. I have python 3.5, installed gcc5 using macports, currently use Cython version 0.23.4, and installed OpenMP through Homebrew. I was able to find answers to most of the problems I ran into, but I can't seem to find one for this.
Edit: which g++ produces /opt/local/bin/g++ and echo ${CXX} produces a blank line
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.