Error building uwsgi with pip in virtual environment - python

I am getting errors when I try to install uwsgi in my virtual environment in my Centos VPS. Ultimately, I cannot install uwsgi.
I am using :
pip install uwsgi
and also :
pathtovirtualenv/bin/pip install uwsgi
I get the following output on the terminal:
wwwthecanonworks#thecanonworks.com [~]# ~/thecanonworks/env/bin/pip install uwsgi
Downloading/unpacking uwsgi
Downloading uwsgi-2.0.8.tar.gz (775kB): 775kB downloaded
Running setup.py (path:/home/wwwthecanonworks/thecanonworks/env/build/uwsgi/setup.py) egg_info for package uwsgi
Installing collected packages: uwsgi
Running setup.py install for uwsgi
Complete output from command /home/wwwthecanonworks/thecanonworks/env/bin/python2.7 -c "import setuptools, tokenize;__file__='/home/wwwthecanonworks/thecanonworks/env/build/uwsgi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-RY9JuM-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/wwwthecanonworks/thecanonworks/env/include/site/python2.7:
running install
----------------------------------------
Cleaning up...
Command /home/wwwthecanonworks/thecanonworks/env/bin/python2.7 -c "import setuptools, tokenize;__file__='/home/wwwthecanonworks/thecanonworks/env/build/uwsgi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-RY9JuM-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/wwwthecanonworks/thecanonworks/env/include/site/python2.7 failed with error code 1 in /home/wwwthecanonworks/thecanonworks/env/build/uwsgi
Storing debug log for failure in /home/wwwthecanonworks/.pip/pip.log
Here is the pip log output:
Skipping http://projects.unbit.it/downloads/uwsgi-1.2.tar.gz (from https://pypi.python.org/simple/uwsgi/) because it is externally hosted.
Skipping http://projects.unbit.it/downloads/uwsgi-1.3.tar.gz (from https://pypi.python.org/simple/uwsgi/) because it is externally hosted.
Skipping http://projects.unbit.it/downloads/uwsgi-1.4.1.tar.gz (from https://pypi.python.org/simple/uwsgi/) because it is externally hosted.
Skipping http://projects.unbit.it/downloads/uwsgi-1.4.10.tar.gz (from https://pypi.python.org/simple/uwsgi/) because it is externally hosted.
Skipping http://projects.unbit.it/downloads/uwsgi-1.4.2.tar.gz (from https://pypi.python.org/simple/uwsgi/) because it is externally hosted.
Skipping http://projects.unbit.it/downloads/uwsgi-1.4.3.tar.gz (from https://pypi.python.org/simple/uwsgi/) because it is externally hosted.
Skipping http://projects.unbit.it/downloads/uwsgi-1.4.4.tar.gz (from https://pypi.python.org/simple/uwsgi/) because it is externally hosted.
Skipping http://projects.unbit.it/downloads/uwsgi-1.4.5.tar.gz (from https://pypi.python.org/simple/uwsgi/) because it is externally hosted.
Skipping http://projects.unbit.it/downloads/uwsgi-1.4.6.tar.gz (from https://pypi.python.org/simple/uwsgi/) because it is externally hosted.
Skipping http://projects.unbit.it/downloads/uwsgi-1.4.7.tar.gz (from https://pypi.python.org/simple/uwsgi/) because it is externally hosted.
Skipping http://projects.unbit.it/downloads/uwsgi-1.4.8.tar.gz (from https://pypi.python.org/simple/uwsgi/) because it is externally hosted.
Skipping http://projects.unbit.it/downloads/uwsgi-1.4.tar.gz (from https://pypi.python.org/simple/uwsgi/) because it is externally hosted.
Skipping link http://projects.unbit.it/uwsgi/ (from https://pypi.python.org/simple/uwsgi/); not a file
Using version 2.0.8 (newest of versions: 2.0.8, 2.0.7, 2.0.6, 2.0.5.1, 2.0.5, 2.0.4, 2.0.3, 2.0.2, 2.0.1, 2.0, 1.9.21.1, 1.9.21, 1.9.20, 1.9.19, 1.9.18.2, 1.9.18.1, 1.9.18, 1.9.17.1, 1.9.17, 1.9.16, 1.9.15, 1.9.14, 1.9.13, 1.9.12, 1$
Downloading from URL https://pypi.python.org/packages/source/u/uWSGI/uwsgi-2.0.8.tar.gz#md5=356b71060aa4c1f0e888dbca03567bd5 (from https://pypi.python.org/simple/uwsgi/)
Running setup.py (path:/tmp/pip_build_wwwthecanonworks/uwsgi/setup.py) egg_info for package uwsgi
running egg_info
creating pip-egg-info/uWSGI.egg-info
writing pip-egg-info/uWSGI.egg-info/PKG-INFO
writing top-level names to pip-egg-info/uWSGI.egg-info/top_level.txt
writing dependency_links to pip-egg-info/uWSGI.egg-info/dependency_links.txt
writing manifest file 'pip-egg-info/uWSGI.egg-info/SOURCES.txt'
warning: manifest_maker: standard file '-c' not found
reading manifest file 'pip-egg-info/uWSGI.egg-info/SOURCES.txt'
writing manifest file 'pip-egg-info/uWSGI.egg-info/SOURCES.txt'
Source in /tmp/pip_build_wwwthecanonworks/uwsgi has version 2.0.8, which satisfies requirement uwsgi
Installing collected packages: uwsgi
Running setup.py install for uwsgi
Running command /usr/local/bin/python2.7 -c "import setuptools, tokenize;__file__='/tmp/pip_build_wwwthecanonworks/uwsgi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exe$
running install
Complete output from command /usr/local/bin/python2.7 -c "import setuptools, tokenize;__file__='/tmp/pip_build_wwwthecanonworks/uwsgi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), _$
running install
----------------------------------------
Cleaning up...
Removing temporary dir /tmp/pip_build_wwwthecanonworks...
Command /usr/local/bin/python2.7 -c "import setuptools, tokenize;__file__='/tmp/pip_build_wwwthecanonworks/uwsgi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" instal$
Exception information:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/usr/local/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/commands/install.py", line 283, in run
requirement_set.install(install_options, global_options, root=options.root_path)
File "/usr/local/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/req.py", line 1435, in install
requirement.install(install_options, global_options, *args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/req.py", line 706, in install
cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False)
File "/usr/local/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/util.py", line 697, in call_subprocess
% (command_desc, proc.returncode, cwd))
InstallationError: Command /home/wwwthecanonworks/thecanonworks2/thecanonworks/env/bin/python2.7 -c "import setuptools, tokenize;__file__='/home/wwwthecanonworks/thecanonworks2/thecanonworks/env/build/uwsgi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-lmaN7I-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/wwwthecanonworks/thecanonworks2/thecanonworks/env/include/site/python2.7 failed with error code 1 in /home/wwwthecanonworks/thecanonworks2/thecanonworks/env/build/uwsgi
here is my virtualenv bin directory :
wwwthecanonworks#thecanonworks.com [~/thecanonworks/env]# ls
./ ../ bin/ include/ lib/
wwwthecanonworks#thecanonworks.com [~/thecanonworks/env]# cd bin
wwwthecanonworks#thecanonworks.com [~/thecanonworks/env/bin]# ls
./ ../ activate activate.csh activate.fish activate_this.py easy_install* easy_install-2.7* pip* pip2* pip2.7* python# python2# python2.7*
update:
I have tried a number of different things and still can't get uwsgi installed.

Try to install the following packages before installing uwsgi:
sudo apt-get -y install build-essential python-dev zlib1g-dev libssl-dev

On CentOS 6.4 I had to install dev tools first:
yum groupinstall "Development Tools"

Related

install llvmlite and numba library for python2 on jetson xavier nx

I want to install numba and llvmlite for python2 on jetson. However there seems to be no documentation on the same. Everything is for python3. I am trying to run a program on ros melodic and hence need the libraries in python2.
When i try
python2.7 -m pip install numba==0.45
I am getting following error
Collecting numba==0.45
Downloading https://files.pythonhosted.org/packages/7e/89/853a1f03b09f1b13b59c3d785678b47daac6ddd24a285f146d09bb723b85/numba-0.45.0.tar.gz (1.8MB)
100% |████████████████████████████████| 1.8MB 328kB/s
Collecting llvmlite>=0.29.0dev0 (from numba==0.45)
Using cached https://files.pythonhosted.org/packages/50/cc/04526507e80d546be5688ce0246e40277b61e7949c3347c6609b6a4154cf/llvmlite-0.32.1.tar.gz
Collecting numpy (from numba==0.45)
Collecting funcsigs (from numba==0.45)
Using cached https://files.pythonhosted.org/packages/69/cb/f5be453359271714c01b9bd06126eaf2e368f1fddfff30818754b5ac2328/funcsigs-1.0.2-py2.py3-none-any.whl
Collecting enum34 (from numba==0.45)
Using cached https://files.pythonhosted.org/packages/6f/2c/a9386903ece2ea85e9807e0e062174dc26fdce8b05f216d00491be29fad5/enum34-1.1.10-py2-none-any.whl
Collecting singledispatch (from numba==0.45)
Using cached https://files.pythonhosted.org/packages/cd/d1/6a9e922826e03f5af7bf348cfb75bcb0bc4c67e19c36805c2545f34427e5/singledispatch-3.6.2-py2.py3-none-any.whl
Collecting six (from singledispatch->numba==0.45)
Using cached https://files.pythonhosted.org/packages/d9/5a/e7c31adbe875f2abbb91bd84cf2dc52d792b5a01506781dbcf25c91daf11/six-1.16.0-py2.py3-none-any.whl
Building wheels for collected packages: numba, llvmlite
Running setup.py bdist_wheel for numba ... done
Stored in directory: /home/nvidia/.cache/pip/wheels/51/5d/c0/420ea2fced22bb1702a294c2cbc0dcaefd6ed61f3d6253fd61
Running setup.py bdist_wheel for llvmlite ... error
Complete output from command /usr/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-ni4NGO/llvmlite/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 /tmp/tmpwjzE5mpip-wheel- --python-tag cp27:
running bdist_wheel
/usr/bin/python2.7 /tmp/pip-build-ni4NGO/llvmlite/ffi/build.py
File "/tmp/pip-build-ni4NGO/llvmlite/ffi/build.py", line 122
raise ValueError(msg.format(_ver_check_skip)) from e
^
SyntaxError: invalid syntax
error: command '/usr/bin/python2.7' failed with exit status 1
----------------------------------------
Failed building wheel for llvmlite
Running setup.py clean for llvmlite
Successfully built numba
Failed to build llvmlite
Installing collected packages: llvmlite, numpy, funcsigs, enum34, six, singledispatch, numba
Running setup.py install for llvmlite ... error
Complete output from command /usr/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-ni4NGO/llvmlite/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-XAdkTG-record/install-record.txt --single-version-externally-managed --compile --user --prefix=:
running install
running build
got version from file /tmp/pip-build-ni4NGO/llvmlite/llvmlite/_version.py {'version': '0.32.1', 'full': 'aa11b129c0b55973067422397821ae6d44fa5e70'}
running build_ext
/usr/bin/python2.7 /tmp/pip-build-ni4NGO/llvmlite/ffi/build.py
File "/tmp/pip-build-ni4NGO/llvmlite/ffi/build.py", line 122
raise ValueError(msg.format(_ver_check_skip)) from e
^
SyntaxError: invalid syntax
error: command '/usr/bin/python2.7' failed with exit status 1
----------------------------------------
Command "/usr/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-ni4NGO/llvmlite/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-XAdkTG-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-ni4NGO/llvmlite/
I solved it.
What worked for me was
sudo apt-get install python-numba
Try to upgrade pip and install the latest versions that support Python 2.7:
python2.7 -m pip install -U "pip < 21.0"
python2.7 -m pip install "llvmlite < 0.32.1" "numba < 0.46"

libvirt-python install on mac error

When i try to install libvirt-python via the following:
pip install libvirt-python
I get the following error:
Collecting libvirt-python
Downloading libvirt-python-2.5.0.tar.gz (172kB)
100% |████████████████████████████████| 174kB 2.4MB/s
Building wheels for collected packages: libvirt-python
Running setup.py bdist_wheel for libvirt-python ... error
Complete output from command /usr/local/opt/python/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/h4/8vv21pzx2k9471lzymg_r3th0000gp/T/pip-build-JcUj3e/libvirt-python/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 /var/folders/h4/8vv21pzx2k9471lzymg_r3th0000gp/T/tmp79QS6spip-wheel- --python-tag cp27:
running bdist_wheel
running build
/usr/local/bin/pkg-config --print-errors --atleast-version=0.9.11 libvirt
/usr/local/opt/python/bin/python2.7 generator.py libvirt /usr/local/Cellar/libvirt/3.0.0/share/libvirt/api/libvirt-api.xml
Found 418 functions in /usr/local/Cellar/libvirt/3.0.0/share/libvirt/api/libvirt-api.xml
Found 0 functions in libvirt-override-api.xml
Generated 344 wrapper functions
Missing type converters:
virConnectSecretEventGenericCallback:1
virStorageVolInfoPtr:1
ERROR: failed virConnectSecretEventRegisterAny
ERROR: failed virStorageVolGetInfoFlags
error: command '/usr/local/opt/python/bin/python2.7' failed with exit status 1
----------------------------------------
Failed building wheel for libvirt-python
Running setup.py clean for libvirt-python
Failed to build libvirt-python
Installing collected packages: libvirt-python
Running setup.py install for libvirt-python ... error
Complete output from command /usr/local/opt/python/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/h4/8vv21pzx2k9471lzymg_r3th0000gp/T/pip-build-JcUj3e/libvirt-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 /var/folders/h4/8vv21pzx2k9471lzymg_r3th0000gp/T/pip-eNRl_m-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
/usr/local/bin/pkg-config --print-errors --atleast-version=0.9.11 libvirt
/usr/local/opt/python/bin/python2.7 generator.py libvirt /usr/local/Cellar/libvirt/3.0.0/share/libvirt/api/libvirt-api.xml
Found 418 functions in /usr/local/Cellar/libvirt/3.0.0/share/libvirt/api/libvirt-api.xml
Found 0 functions in libvirt-override-api.xml
Generated 344 wrapper functions
Missing type converters:
virConnectSecretEventGenericCallback:1
virStorageVolInfoPtr:1
ERROR: failed virConnectSecretEventRegisterAny
ERROR: failed virStorageVolGetInfoFlags
error: command '/usr/local/opt/python/bin/python2.7' failed with exit status 1
----------------------------------------
Command "/usr/local/opt/python/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/h4/8vv21pzx2k9471lzymg_r3th0000gp/T/pip-build-JcUj3e/libvirt-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 /var/folders/h4/8vv21pzx2k9471lzymg_r3th0000gp/T/pip-eNRl_m-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/h4/8vv21pzx2k9471lzymg_r3th0000gp/T/pip-build-JcUj3e/libvirt-python/
Any help would be appreciated as I'm out of ideas on how to fix this.
Mac 10.11.4
Python 2.7.13 & 2.7.10
libvirt installed via brew
Warning: libvirt-3.0.0 already installed
You need to install libvirt-python 3.0.0 but the one on PyPI is still 2.5.0. Run this command instead:
pip install https://libvirt.org/sources/python/libvirt-python-3.0.0.tar.gz
Reference:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=852886
We forgot to upload the 3.0.0 release to PyPI. This mistake is resolved now, so if you retry it should build correctly.

pip install dryscrape fails with "error: [Errno 2] No such file or directory: 'src/webkit_server'"?

I need to install dryscrape for python but I got error, what's the problem?
C:\Users\parvij\Anaconda3\Scripts>pip install dryscrape
I got this:
Collecting dryscrape
Collecting webkit-server>=1.0 (from dryscrape)
Using cached webkit-server-1.0.tar.gz
Collecting xvfbwrapper (from dryscrape)
Requirement already satisfied (use --upgrade to upgrade): lxml in c:\users\parvij\anaconda3\lib\site-packages (from dryscrape)
Building wheels for collected packages: webkit-server
Running setup.py bdist_wheel for webkit-server ... error
Complete output from command c:\users\parvij\anaconda3\python.exe -u -c"import setuptools,tokenize;__file__='C:\\Users\\parvij\\AppData\\Local\\Temp\\pip-build-o7nlv0dz\\webkit-server\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d C:\Users\parvij\AppData\Local\Temp\tmp71w59qv6pip-wheel- --python-tag cp35:
running bdist_wheel
running build
'make' is not recognized as an internal or external command,
operable program or batch file.
error: [Errno 2] No such file or directory: 'src/webkit_server'
----------------------------------------
Failed building wheel for webkit-server
Running setup.py clean for webkit-server
Failed to build webkit-server
Installing collected packages: webkit-server, xvfbwrapper, dryscrape
Running setup.py install for webkit-server ... error
Complete output from command c:\users\parvij\anaconda3\python.exe -u -c"import setuptools,tokenize;__file__='C:\\Users\\parvij\\AppData\\Local\\Temp\\pip-build-o7nlv0dz\\webkit-server\\setup.py';exec(compile(getattr(tokenize, 'open',open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\parvij\AppData\Local\Temp\pip-tyzalid7-record\install-record.txt --single-version-externally-managed --compile:
running install
running build
'make' is not recognized as an internal or external command,
operable program or batch file.
error: [Errno 2] No such file or directory: 'src/webkit_server'
----------------------------------------
Command "c:\users\parvij\anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\parvij\\AppData\\Local\\Temp\\pip-build-o7nlv0dz\\webkit-server\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\parvij\AppData\Local\Temp\pip-tyzalid7-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\parvij\AppData\Local\Temp\pip-build-o7nlv0dz\webkit-server\
my operating system is windows 8
my python version is 3.5
Download webkit-server from github
git clone https://github.com/niklasb/webkit-server.git webkit-server
Change in webkit-server/setup.py :
shutil.copy('src/webkit_server', self.build_purelib)
shutil.copy('src/webkit_server', self.build_platlib)
to
shutil.copy('src/webkit_server.pro', self.build_purelib)
shutil.copy('src/webkit_server.pro', self.build_platlib)
then
cd webkit-server
python setup.py install
There you go.
Need to install http://www.qt.io. Also, The 5.6+ version of Qt removes the Qt WebKit module in favor of the new module Qt WebEngine. So far, webkit-server has not been ported to WebEngine (and likely won't be in the near future), so Qt <= 5.5 is a requirement.
From the doc, you have to installed also requirements.
You can do this as follow
pip install -r requirements.txt
After this retry to install dryscrape.
Need do install qt4 and libqtwebkit-dev for compile webkit-server, then follow the steps of #Erwan Clügairtz
sudo apt install libqtwebkit-dev qt4

pip target directory on CentOS6 with scl

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.

Intalling from requirements.txt fails

I am trying to install the requirements of an old project and I am hitting a few problems. One of which I can't figure out is this error:
Requirement already satisfied (use --upgrade to upgrade): wsgiref==0.1.2 in /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 (from -r requirements.txt (line 38))
Installing collected packages: distribute, dj-database-url, django-celery, django-debug-toolbar, django-heroku-memcacheify, django-pylibmc-sasl, facebook-sdk, gdata, gevent, google-api-python-client, greenlet, gunicorn, htmlentities, httplib2, kombu, nltk, psycopg2, pygeoip, pylibmc, pymongo, python-dateutil, python-gflags, pytz, shortuuid, simplejson, sleekxmpp
Running setup.py install for distribute
Before install bootstrap.
Scanning installed packages
Setuptools installation detected at /Users/pp/www/hintortwoDEV/venv/lib/python2.7/site-packages/setuptools-3.5.1-py2.7.egg
Egg installation
Patching...
Renaming /Users/pp/www/hintortwoDEV/venv/lib/python2.7/site-packages/setuptools-3.5.1-py2.7.egg into /Users/pp/www/hintortwoDEV/venv/lib/python2.7/site-packages/setuptools-3.5.1-py2.7.egg.OLD.1401611004.21
Patched done.
Relaunching...
Traceback (most recent call last):
File "<string>", line 1, in <module>
NameError: name 'install' is not defined
Complete output from command /Users/pp/www/hintortwoDEV/venv/bin/python -c "import setuptools, tokenize;__file__='/Users/pp/www/hintortwoDEV/venv/build/distribute/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-1G5NO8-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/pp/www/hintortwoDEV/venv/include/site/python2.7:
Before install bootstrap.
Scanning installed packages
Setuptools installation detected at /Users/pp/www/hintortwoDEV/venv/lib/python2.7/site-packages/setuptools-3.5.1-py2.7.egg
Egg installation
Patching...
Renaming /Users/pp/www/hintortwoDEV/venv/lib/python2.7/site-packages/setuptools-3.5.1-py2.7.egg into /Users/pp/www/hintortwoDEV/venv/lib/python2.7/site-packages/setuptools-3.5.1-py2.7.egg.OLD.1401611004.21
Patched done.
Relaunching...
Traceback (most recent call last):
File "<string>", line 1, in <module>
NameError: name 'install' is not defined
----------------------------------------
Cleaning up...
Command /Users/pp/www/hintortwoDEV/venv/bin/python -c "import setuptools, tokenize;__file__='/Users/pp/www/hintortwoDEV/venv/build/distribute/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-1G5NO8-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/pp/www/hintortwoDEV/venv/include/site/python2.7 failed with error code 1 in /Users/pp/www/hintortwoDEV/venv/build/distribute
Storing debug log for failure in /Users/pp/.pip/pip.log
I don't understand the error at all so you can provide explanation and logical fix for it that would be awesoming.
UPDATE 1:
(answering the questions in the comments)
#burhan: python is 2.7. I lost log because I cleaned it up to show you that specific error, but then other errors and then i couldn't reproduce it :(
#SeMeKh: yes, it says: pip 1.5.6 from /Users/pp/www/hintortwoDEV/venv/lib/python2.7/site-packages (python 2.7)
#Padraic: distribute==0.6.28

Categories

Resources