You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is very surprising since I cannot seem to reproduce the bug. On what platform are you? When using pip, the variable install_requires defined in the setup.py should install automatically cython when building 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 requirements.txt file, (ii) installing the remaining requirements using pip install -r requirements.txt, and (iii) installing POT on its own pip install pot.
I believe it must be part of the requirements, since doing just pip install pot works for me. The only time it doesn't work is when it is being installed from a requirements.txt file.
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.
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 install_requires parameter has only been added recently and if you have an old pip he might discard it and not install cython that is required to compile POT. if you want to be sure to compile whatever the pip version you can always add cython in the requirement (I know nobody wants that but we do not provide pre-compiled eggs on pipy).
Edit: reran the test after cleaning PYTHONPATH variable.
I'm wondering if it is a problem related to pypa/pip#2478
Its the same pip version for both, this is a weird bug. install_requires should work on both 2.7 and 3.6 but it seems to fail installing Cython before POT on 2.7...
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 Cython.Build import cythonize
ModuleNotFoundError: No module named 'Cython'
FROM ubuntu:latest
RUN apt-get -qq update && apt-get -qq -y install python3.7 python3-pip build-essential
RUN pip3 install POT
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
FROM ubuntu:latest
RUN apt-get -qq update && apt-get -qq -y install python3.7 python3-pip build-essential git
RUN pip3 install cython numpy
RUN pip3 install POT
I agree it's not optimal but i don't think we can do anything until the question is handled by pypi
Activity
rflamary commentedon Jul 30, 2018
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
install_requiresdefined in thesetup.pyshould install automatically cython when building POT.Adoni commentedon Jul 30, 2018
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.
rflamary commentedon Nov 6, 2018
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 :
https://github.com/rflamary/POT/blob/master/.github/ISSUE_TEMPLATE/bug_report.md
leotrs commentedon Jan 10, 2019
I have been able to reproduce the bug by installing POT from a
requirements.txtfile. Example bash session follows.ncourty commentedon Jan 10, 2019
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...
ncourty commentedon Jan 10, 2019
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
leotrs commentedon Jan 10, 2019
No. I'm on Ubuntu 16.04. I should clarify that I was able to install POT by (i) removing it from the
requirements.txtfile, (ii) installing the remaining requirements usingpip install -r requirements.txt, and (iii) installing POT on its ownpip install pot.leotrs commentedon Jan 14, 2019
I believe it must be part of the requirements, since doing just
pip install potworks for me. The only time it doesn't work is when it is being installed from arequirements.txtfile.leotrs commentedon Mar 6, 2019
Any updates on this?
rflamary commentedon Mar 7, 2019
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
install_requiresparameter has only been added recently and if you have an old pip he might discard it and not install cython that is required to compile POT. if you want to be sure to compile whatever the pip version you can always add cython in the requirement (I know nobody wants that but we do not provide pre-compiled eggs on pipy).Edit: reran the test after cleaning PYTHONPATH variable.
leotrs commentedon Mar 20, 2019
@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.
rflamary commentedon Mar 20, 2019
OK I managed to reproduce the problem.
This occurs on python2.7 when i force it for the virtual environment
It works on python 3.6...
I'm wondering if it is a problem related to pypa/pip#2478
Its the same pip version for both, this is a weird bug.
install_requiresshould work on both 2.7 and 3.6 but it seems to fail installing Cython before POT on 2.7...edit: wrong link
joshua-gould commentedon Apr 30, 2019
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 Cython.Build import cythonize
ModuleNotFoundError: No module named 'Cython'
FROM ubuntu:latest
RUN apt-get -qq update && apt-get -qq -y install python3.7 python3-pip build-essential
RUN pip3 install POT
rflamary commentedon May 3, 2019
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/.
rflamary commentedon Jun 4, 2019
Hello,
This problem is a known bug from pypi discussed here
pypa/pip#2478
and here
pypa/setuptools#391
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