Skip to content
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

ml_metrics fails to install via pip #7

Closed
ndronen opened this issue Nov 25, 2013 · 3 comments
Closed

ml_metrics fails to install via pip #7

ndronen opened this issue Nov 25, 2013 · 3 comments

Comments

@ndronen
Copy link

ndronen commented Nov 25, 2013

$ pip --version
pip 1.4.1 from /usr/local/lib/python2.7/site-packages/pip-1.4.1-py2.7.egg (python 2.7

$ pip install ml_metrics
Downloading/unpacking ml-metrics
Downloading ml_metrics-0.1.3.zip
Running setup.py egg_info for package ml-metrics
Traceback (most recent call last):
File "", line 16, in
File "/Users/ndronen/Source/dissertation/projects/iclr-2014/build/ml-metrics/setup.py", line 6, in
requirements = [x.strip() for x in open("requirements.txt")]
IOError: [Errno 2] No such file or directory: 'requirements.txt'
Complete output from command python setup.py egg_info:
Traceback (most recent call last):

File "", line 16, in

File "/Users/ndronen/Source/build/ml-metrics/setup.py", line 6, in

requirements = [x.strip() for x in open("requirements.txt")]

IOError: [Errno 2] No such file or directory: 'requirements.txt'

@renaud
Copy link

renaud commented Mar 17, 2014

same here with pip, and easy_install, too:

ren@~$ easy_install ml_metrics
Searching for ml-metrics
Reading http://pypi.python.org/simple/ml_metrics/
Best match: ml-metrics 0.1.3
Downloading https://pypi.python.org/packages/source/m/ml_metrics/ml_metrics-0.1.3.zip#md5=442a74b5e9fbe838386010555025c948
Processing ml_metrics-0.1.3.zip
Writing /var/folders/9j/ghhf52c94bbc9bm4x9sr4cww0000gn/T/easy_install-P7YPTu/ml_metrics-0.1.3/setup.cfg
Running ml_metrics-0.1.3/setup.py -q bdist_egg --dist-dir /var/folders/9j/ghhf52c94bbc9bm4x9sr4cww0000gn/T/easy_install-P7YPTu/ml_metrics-0.1.3/egg-dist-tmp-uyq3Dc
error: requirements.txt: No such file or directory

Installing from source worked, though.

@danstowell
Copy link

I had exactly the same problem. It's because the line in setup.py needs changing from

  requirements = [x.strip() for x in open("requirements.txt")]

to

  requirements = [x.strip() for x in open("ml_metrics.egg-info/requires.txt")]

since in the "egg" the requirements file has moved location. I don't know how the egg bundling is managed though, so not sure where the source code fix would go. However, on my machine I manually edited /tmp/pip-build-root/ml-metrics/setup.py after the fail, and then it worked on second try.

@denadai2
Copy link

#9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants