I am failing to install SRC in Linux Mint 19 via PIP. I have attempted to paste the output and failed horribly, I have had to double space everything, otherwise, it comes out as one long run-on sentence. Not sure how to paste a readable output of my Linux terminal here. Sorry.....
Failed building wheel for src
Running setup.py clean for src
Failed to build src
Installing collected packages: src
Running setup.py install for src ... error
Complete output from command /usr/bin/python -u -c "import setuptools,
tokenize;__file__='/tmp/pip-build-l2mswq/src/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-AeHl8U-record/install-record.txt --single-version-externally-managed --
compile --user --prefix=:
running install
error: error in command line: command 'InstallCommand' has no such option
'compile'
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-
build-l2mswq/src/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-AeHl8U-record/install-record.txt -
-single-version-externally-managed --compile --user --prefix=" failed with error
code 1 in /tmp/pip-build-l2mswq/src/
pip install src
tries to install src from PyPI — a package specifically created to not to be installed.
What are you trying to install?
Related
Collecting zbar
Using cached https://files.pythonhosted.org/packages/33/54/cc5819efc9ee7e34b60b41e1d2d4753b6dd0c26a41c9a552611f66aa106e/zbar-0.10.tar.bz2
Installing collected packages: zbar
Running setup.py install for zbar ... error
Complete output from command c:\python27\python.exe -u -c "import
setuptools,
tokenize;file='c:\users\k\appdata\local\temp\pip-build-y0jgcd\zbar\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\k\appdata\local\temp\pip-labpqj-record\install-record.txt
--single-version-externally-managed --compile:
running install
running build
running build_ext
building 'zbar' extension
error: INCLUDE environment variable is empty
Command "c:\python27\python.exe -u -c "import setuptools,
tokenize;file='c:\users\k\appdata\local\temp\pip-build-y0jgcd\zbar\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\k\appdata\local\temp\pip-labpqj-record\install-record.txt
--single-version-externally-managed --compile" failed with error code 1 in c:\users\k\appdata\local\temp\pip-build-y0jgcd\zbar\
how to fix this problem
Try the install steps provided in : https://github.com/ZBar/ZBar/blob/master/README
I have already installed mysql-devel, it didn't solve the problem.
I am trying to executed the following commands:
sudo easy_install-2.7 MySQL-python
sudo pip2.7 install MySQL-python
in the first one I see:
error: Setup script exited with error: command 'gcc' failed with exit
status 1
In the second one:
Command "/usr/local/bin/python2.7 -u -c "import setuptools,
tokenize;file='/tmp/pip-build-nySVuQ/MySQL-python/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-eC4DGP-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-nySVuQ/MySQL-python/
Is there any possibility to solve it?
Thanks in advance,
Duplicate of this issue, but the first answer there is wrong (jq is supported on Windows) and the second refers to brew so I'm guessing is for Mac.
Windows
I am trying to install jq for python from the Windows command line, but get the following errors, possibly due to a missing temp\pip-build-rtnhmg\jq\onig-install-5.9.6 file:
error: [Error 2] The system cannot find the file specified
... and ...
Command "c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\<USERNAME>\\appdata\\local\\temp\\pip-build-rtnhmg\\jq\\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\<USERNAME>\appdata\local\temp\pip-khvjht-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\<USERNAME>\appdata\local\temp\pip-build-rtnhmg\jq\
Does anyone know what's gone wrong here? Searches on StackOverflow and Google aren't giving me much to go on, and I'm not great with Windows and still new to python/pip.
Here is the full text, minus username:
Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. All rights reserved.
C:\WINDOWS\system32>pip install jq
Collecting jq
Using cached jq-0.1.6.tar.gz
Building wheels for collected packages: jq
Running setup.py bdist_wheel for jq ... error
Complete output from command c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\<USERNAME>\\appdata\\local\\temp\\pip-build-rtnhmg\\jq\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d c:\users\<USERNAME>\appdata\local\temp\tmpuvrf_upip-wheel- --python-tag cp27:
running bdist_wheel
running build
running build_ext
Executing: ./configure CFLAGS=-fPIC --prefix=c:\users\<USERNAME>\appdata\local\temp\pip-build-rtnhmg\jq\onig-install-5.9.6
error: [Error 2] The system cannot find the file specified
----------------------------------------
Failed building wheel for jq
Running setup.py clean for jq
Failed to build jq
Installing collected packages: jq
Running setup.py install for jq ... error
Complete output from command c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\<USERNAME>\\appdata\\local\\temp\\pip-build-rtnhmg\\jq\\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\<USERNAME>\appdata\local\temp\pip-khvjht-record\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_ext
Executing: ./configure CFLAGS=-fPIC --prefix=c:\users\<USERNAME>\appdata\local\temp\pip-build-rtnhmg\jq\onig-install-5.9.6
error: [Error 2] The system cannot find the file specified
----------------------------------------
Command "c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\<USERNAME>\\appdata\\local\\temp\\pip-build-rtnhmg\\jq\\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\<USERNAME>\appdata\local\temp\pip-khvjht-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in c:\users\<USERNAME>\appdata\local\temp\pip-build-rtnhmg\jq\
Trying to install pyjq instead generates the same errors.
I'm not married to jq: I just need to format json data in python, and jq does a great job on the command line. If there are other python packages I should try instead, please feel free to recommend them. As mentioned above though, pyjq is failing install with the same errors.
Further details / steps taken:
I am on Windows 10 and have installed python 2.7.13, setuptools and pip using the steps from here ... no issues noted.
Using pip, I have successfully installed other python packages such as request and jira ... no issues noted.
Using chocolatey I have successfully installed jq for the command line, following these steps ... no issues noted.
I have tried using regular permissions, running cmd as administrator, starting a new cmd session, restarting the PC - but get the same errors.
Trying to install pyjq (pip install pyjq) generates the same errors.
Tried pip install jq on a Mac and got similar errors:
Command "/usr/local/opt/python/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/v5/4x0py0ns2td1h69vgllx7dpr0000gn/T/pip-build-DyMoT4/jq/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/v5/4x0py0ns2td1h69vgllx7dpr0000gn/T/pip-i6UKvt-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/v5/4x0py0ns2td1h69vgllx7dpr0000gn/T/pip-build-DyMoT4/jq/
for the Mac, followed the steps suggested from here and successfully installed setuptools as suggested, but pip install jq still fails with the same error.
Installing via pip
As per jq installation steps for pip's project:
Installation requires any programs required to build jq. This includes:
Autoreconf
The normal C compiler toolchain, such as gcc and make.
libtool
Python headers.
macOS
On macOS, you need XCode to be installed, and the following packages:
brew install autoconf automake libtool
brew install jq
Linux
You need the following packages to be installed:
yum install autoconf automake libtool python
I am trying to configure pip target path on CentOS by all known methods to no avail. I have no su rights. What I did:
export PYTHONPATH=$HOME/tools/.usr/py2/lib
echo $PYTHONPATH
# returns $HOME/tools/.usr/py2/lib
content of ~/.pydistutils.cfg:
[install]
install_scripts = $HOME/tools/.usr/py2/scripts
install_data = $HOME/tools/.usr/py2/data
install_lib = $HOME/tools/.usr/py2/lib
Running
scl enable python27 '$HOME/tools/.usr/py2/scripts/pip install --install-option="--home=$HOME/tools/.usr/py2/lib" ipython'
results in warnings like this:
Target directory $HOME/tools/.usr/py3/lib/pathlib2.py already exists. Specify --upgrade to force replacement.
I.e. it has uses some other path file or variable than all listed above and believes that target is $HOME/tools/.usr/py3/lib. Why is it so and how to force it to my $PYTHONPATH?
Another try:
scl enable python27 '$HOME/tools/.usr/py2/scripts/pip install --install-option="--prefix=/ye/netapp/jimmie.ye/tools/.usr/py2/lib" --upgrade pip'
$HOME/tools/.usr/py2/lib/pip-8.1.1-py2.7.egg/pip/commands/install.py:180: UserWarning: Disabling all use of wheels due to the use of --build-options / --global-options / --install-options.
cmdoptions.check_install_build_global(options)
Collecting pip
Using cached pip-8.1.1.tar.gz
Installing collected packages: pip
Running setup.py install for pip ... error
Complete output from command /opt/rh/python27/root/usr/bin/python2 -u -c "import setuptools, tokenize;__file__='/scrape/dlituiev/pip-build-pGEJ7L/pip/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /scrape/dlituiev/pip-SScyQc-record/install-record.txt --single-version-externally-managed --compile --prefix=/ye/netapp/jimmie.ye/tools/.usr/py2/lib --home=/scrape/dlituiev/tmps67g2R:
running install
error: must supply either home or prefix/exec-prefix -- not both
----------------------------------------
Command "/opt/rh/python27/root/usr/bin/python2 -u -c "import setuptools, tokenize;__file__='/scrape/pip-build-pGEJ7L/pip/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /scrape/dlituiev/pip-SScyQc-record/install-record.txt --single-version-externally-managed --compile --prefix=$HOME/tools/.usr/py2/lib --home=/scrape/tmps67g2R" failed with error code 1 in /scrape/pip-build-pGEJ7L/pip/
all $HOME are spelled in full in original commands and errors.
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.