When trying to install the module docx I get the error code 1. Also tried to install it from file.
I am using Python 3.7.0a4 64bit, pip is uptodate as well as setuptools
I tried to install a different module and got the same error.
Anyone have an idea?
Here is the error:
Command ""e:\programme\python 3.7.0a4 64bit\python.exe" -u -c "import setuptools
, tokenize;____file____='C:\Users\Marius\AppData\Local\Temp\pip-build-at8ydfxt
\lxml\setup.py';f=getattr(tokenize, 'open', open)(____file____);code=f.read().repl
ace('\r\n', '\n');f.close();exec(compile(code, ____file____, 'exec'))" install --rec
ord C:\Users\Marius\AppData\Local\Temp\pip-90k4qvt1-record\install-record.txt --
single-version-externally-managed --compile" failed with error code 1 in C:\User
s\Marius\AppData\Local\Temp\pip-build-at8ydfxt\lxml\
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.
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've tried installing pycryptodome, pycrypto, and pycryptodomex and none of them seem to be downloading. I keep getting this pip install error:
error: command '/usr/bin/clang' failed with exit status 1 Command
"/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
-u -c "import setuptools, tokenize;file='/private/var/folders/tn/c5hkkz_94rxfyghjrlzvj4nr0000gp/T/pip-build-Cl1sR8/pycryptodomex/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/tn/c5hkkz_94rxfyghjrlzvj4nr0000gp/T/pip-VrIJcG-record/install-record.txt
--single-version-externally-managed --compile" failed with error code 1 in
/private/var/folders/tn/c5hkkz_94rxfyghjrlzvj4nr0000gp/T/pip-build-Cl1sR8/pycryptodomex/
I'm using Mac OSX El Captain currently, I have python 2.7 and 3.5 installed, I'm hoping it will go to my python 3.5. I used the terminal command pip install pycryptodome and others switching the names out, none of them seem to work.
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