New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip installing from cvxopt-1.1.3-py3.tar.gz but I am running python2.7 #310

Closed
tub78 opened this Issue Jun 26, 2011 · 1 comment

Comments

Projects
None yet
3 participants
@tub78

tub78 commented Jun 26, 2011

When I run:

pip install cvxopt

the wrong version of cvxopt is downloaded. I am using python2.7, but pip is downloading cvxopt-1.1.3-py3.tar.gz. For completeness, more details and a solution are included below.

What, if anything can the maintainer do to direct pip to use the correct version?

Thanks,

  • Stu

More Details

This error is not evident initially, because the setup.py file is not located where pip expects it. See LOG (1) below.

The fact that cvxopt-1.1.3-py3.tar.gz is incompatible with python2.7 becomes evident after cd'ing into the src/ directory where the setup.py file was downloaded and running the command:

python setup.py install 

This generates the error seen in LOG (2) below. I have since learned that I can specify the correct version of cvxopt on the command line, e.g.

pip install http://pypi.python.org/packages/source/C/CVXOPT/cvxopt-1.1.3.tar.gz

but still encounter the problem of the misplaced setup.py file. My solution was to install manually, e.g.

wget -nd http://pypi.python.org/packages/source/C/CVXOPT/cvxopt-1.1.3.tar.gz
tar -xvf cvxopt-1.1.3.tar.gz 
cd cvxopt-1.1.3/src/
python setup.py -v install

LOG (1)

Downloading/unpacking cvxopt
Getting page http://pypi.python.org/simple/cvxopt
URLs to search for versions for cvxopt:

IOError: [Errno 2] No such file or directory: '/Users/stu/Research/Tools/PythonVirtualEnvs/numscipy-p27-brew/build/cvxopt/setup.py'


Command python setup.py egg_info failed with error code 1
Exception information:
Traceback (most recent call last):
File "/Users/stu/Research/Tools/PythonVirtualEnvs/numscipy-p27-brew/lib/python2.7/site-packages/pip-1.0-py2.7.egg/pip/basecommand.py", line 126, in main
self.run(options, args)
File "/Users/stu/Research/Tools/PythonVirtualEnvs/numscipy-p27-brew/lib/python2.7/site-packages/pip-1.0-py2.7.egg/pip/commands/install.py", line 223, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/Users/stu/Research/Tools/PythonVirtualEnvs/numscipy-p27-brew/lib/python2.7/site-packages/pip-1.0-py2.7.egg/pip/req.py", line 980, in prepare_files
req_to_install.run_egg_info()
File "/Users/stu/Research/Tools/PythonVirtualEnvs/numscipy-p27-brew/lib/python2.7/site-packages/pip-1.0-py2.7.egg/pip/req.py", line 216, in run_egg_info
command_desc='python setup.py egg_info')
File "/Users/stu/Research/Tools/PythonVirtualEnvs/numscipy-p27-brew/lib/python2.7/site-packages/pip-1.0-py2.7.egg/pip/init.py", line 255, in call_subprocess
% (command_desc, proc.returncode))
InstallationError: Command python setup.py egg_info failed with error code 1

LOG (2)

python setup.py install
running install
running build
running build_py
creating build
creating build/lib.macosx-10.4-x86_64-2.7
creating build/lib.macosx-10.4-x86_64-2.7/cvxopt
copying python/init.py -> build/lib.macosx-10.4-x86_64-2.7/cvxopt
copying python/coneprog.py -> build/lib.macosx-10.4-x86_64-2.7/cvxopt
copying python/cvxprog.py -> build/lib.macosx-10.4-x86_64-2.7/cvxopt
copying python/info.py -> build/lib.macosx-10.4-x86_64-2.7/cvxopt
copying python/misc.py -> build/lib.macosx-10.4-x86_64-2.7/cvxopt
copying python/modeling.py -> build/lib.macosx-10.4-x86_64-2.7/cvxopt
copying python/msk.py -> build/lib.macosx-10.4-x86_64-2.7/cvxopt
copying python/printing.py -> build/lib.macosx-10.4-x86_64-2.7/cvxopt
copying python/solvers.py -> build/lib.macosx-10.4-x86_64-2.7/cvxopt
running build_ext
building 'gsl' extension
creating build/temp.macosx-10.4-x86_64-2.7
creating build/temp.macosx-10.4-x86_64-2.7/C
/usr/bin/cc -fno-strict-aliasing -fno-common -dynamic -O3 -march=core2 -msse4.1 -w -pipe -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/include/gsl -I/usr/local/Cellar/python/2.7.1/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c C/gsl.c -o build/temp.macosx-10.4-x86_64-2.7/C/gsl.o
C/gsl.c:174: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘gsl_module’
C/gsl.c: In function ‘PyInit_gsl’:
C/gsl.c:188: error: ‘gsl_module’ undeclared (first use in this function)
C/gsl.c:188: error: (Each undeclared identifier is reported only once
C/gsl.c:188: error: for each function it appears in.)
error: command '/usr/bin/cc' failed with exit status 1

ogirardot added a commit to ogirardot/pip that referenced this issue Dec 10, 2011

@ogirardot

This comment has been minimized.

Show comment
Hide comment
@ogirardot

ogirardot Dec 10, 2011

Contributor

this was a regexp issue, as we're waiting for a version name like 3.x or 2.x or 1.x, and the package is -py3
I made a fix and in the meantime will be contact the cvxopt to change the package name.

Contributor

ogirardot commented Dec 10, 2011

this was a regexp issue, as we're waiting for a version name like 3.x or 2.x or 1.x, and the package is -py3
I made a fix and in the meantime will be contact the cvxopt to change the package name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment