-
Notifications
You must be signed in to change notification settings - Fork 502
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
fail when using "pip install POT" #59
Comments
Hello @Adoni and thank you for the bug report. This is very surprising since I cannot seem to reproduce the bug. On what platform are you? When using pip, the variable |
It's mac os in my computer and I'm using anaconda. However, my friend reproduced this bug in Linux, who didn't use Anaconda. So to some degree I think this is a common problem. |
Hello i'm sorry but I don't have enough information to reproduce the bug. On anaconda we recommend to use conda forge that take care of all compilation. We now have an issue template with the list of required information : |
I have been able to reproduce the bug by installing POT from a leo@lily: test-pot$ mkvirtualenv test-pot
Running virtualenv with interpreter /usr/bin/python2
New python executable in /home/leo/.virtualenvs/test-pot/bin/python2
Also creating executable in /home/leo/.virtualenvs/test-pot/bin/python
Installing setuptools, pkg_resources, pip, wheel...done.
virtualenvwrapper.user_scripts creating /home/leo/.virtualenvs/test-pot/bin/predeactivate
virtualenvwrapper.user_scripts creating /home/leo/.virtualenvs/test-pot/bin/postdeactivate
virtualenvwrapper.user_scripts creating /home/leo/.virtualenvs/test-pot/bin/preactivate
virtualenvwrapper.user_scripts creating /home/leo/.virtualenvs/test-pot/bin/postactivate
virtualenvwrapper.user_scripts creating /home/leo/.virtualenvs/test-pot/bin/get_env_details
(test-pot) leo@lily: test-pot$ echo "matplotlib==2.0.2
> numpy==1.13.1
> networkx==1.11
> scikit-learn==0.18.2
> scipy==0.19.1
> pandas==0.19.1
> POT==0.5.1" > requirements.txt
(test-pot) leo@lily: test-pot$ cat requirements.txt
matplotlib==2.0.2
numpy==1.13.1
networkx==1.11
scikit-learn==0.18.2
scipy==0.19.1
pandas==0.19.1
POT==0.5.1
(test-pot) leo@lily: test-pot$ pip install -r requirements.txt
<suppressed output...>
Collecting POT==0.5.1 (from -r requirements.txt (line 7))
Using cached https://files.pythonhosted.org/packages/28/4b/7aaa1f840a359f5953dd378e0237fa8faf9b0a415ff7282b7375fbe68d27/POT-0.5.1.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-zvHRKm/POT/setup.py", line 7, in <module>
from Cython.Build import cythonize
ImportError: No module named Cython.Build
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-zvHRKm/POT/ |
Hi @leotrs, are you working on OSX Mojave ? It seems the problem comes from a bad include directory with the compiler used by Cython. See this issue #71 (comment) with the patch that was supposed to work at that time... |
wait I might have reacted too quickly.... Is cython installed on your side ? Maybe we just forgot to add it in the requirements as it usually ships with most python distrib |
No. I'm on Ubuntu 16.04. I should clarify that I was able to install POT by (i) removing it from the |
I believe it must be part of the requirements, since doing just |
Any updates on this? |
Hello @leotrs, Sorry for the late reply but we have been quite busy. I have seen the discussion on the bug you refered and I can tell you the POT is actively maintained. e have peaks of activity followed by limited availability but we try to handle bugs in a timely manner (except this one apparently ;) ) This is a weird bug and I am trying to reproduce your bug but i'm on ubuntu 18.04. This is what i have
And it automatically installed cython which seemed to be the bug in what you sent us. I tried it with python3.6 and python2.7 and it worked. I'm not familiar with virtualenvwrapper but i don't this the discrepancy come from here. So it might be a problem of version from pip? The Edit: reran the test after cleaning PYTHONPATH variable. |
@rflamary thank you for looking into this. I don't think it's the version of pip since we are replicating the bug across a number of computers. |
OK I managed to reproduce the problem.
It works on python 3.6... I'm wondering if it is a problem related to pypa/pip#2478 edit: wrong link |
Here's a Dockerfile that shows the package failing using pip install with the error File "/tmp/pip-build-y26thcux/POT/setup.py", line 7, in FROM ubuntu:latest |
This is perfect for debug thank you. I will have a look (probably after the NeurIPS deadline) but i think it might be corrected by properly defining build dependencies as discussed https://packaging.python.org/specifications/declaring-build-dependencies/ and https://www.python.org/dev/peps/pep-0518/. |
Hello, This problem is a known bug from pypi discussed here and here Basically in order to install POT you need to have cython and numpy already installed because they are dependency at build time. From what i saw this is a common problem. I think it could be addressed if we provided compiled eggs (since they won't require building anymore) but its a lot of work. a working Dockerfile below
I agree it's not optimal but i don't think we can do anything until the question is handled by pypi |
When I use "pip install POT", it failed. It depended on Cython. However, it seems that it forgets to tell pip that it depends on Cython.
I solve this problem by install Cython first. However, if we write both Cython and POT into requirements.txt, the installation will fail.
Could anyone solve that?
The text was updated successfully, but these errors were encountered: