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
Related
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.
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 have installed python to create a deep neural network on Windows 10 to 64-bit. I installed the version 3.5 and after the version 2.7. In any case, I could not install numpy and SciPy with the pip command. In fact, I will open the command prompt as administrator, launch the command "pip install numpy" and it print:
Command "C:\Python27\python.exe -c "import setuptools, tokenize;__file__='c:\\users\\claud\\appdata\\local\\temp\\pip-build-93rn_o\\numpy\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\claud\appdata\local\temp\pip-lw65ht-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\claud\appdata\local\temp\pip-build-93rn_o\numpy
I also downloaded the installer of numpy and scipy, but nothing yet. I also tried to install Anaconda, but I can not find any way to install numpy and scipy. What should I do?
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.