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

Pip install fails with ImportError: No module named Cython.Distutils #106

Closed
mhidas opened this issue May 22, 2018 · 7 comments
Closed

Pip install fails with ImportError: No module named Cython.Distutils #106

mhidas opened this issue May 22, 2018 · 7 comments

Comments

@mhidas
Copy link

mhidas commented May 22, 2018

pip doesn't seem able to install cf-units 2.0.1:

$ pip install cf-units
Collecting cf-units
  Using cached https://files.pythonhosted.org/packages/0c/01/32ac56ae9977baf05dca9b3c563c96118b4204dff5161ce5ec58113b649c/cf_units-2.0.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-hajt1m/cf-units/setup.py", line 6, in <module>
        from Cython.Distutils import build_ext
    ImportError: No module named Cython.Distutils
@pelson
Copy link
Member

pelson commented May 22, 2018

Thanks @mhidas. Naturally, pip install cython addresses the problem in the short term.
In the slightly longer-term, cf_units needs to implement it's setup.py a little more carefully to handle the case when cython is not already installed.

@pelson
Copy link
Member

pelson commented May 22, 2018

Relates to active discussion at pypa/setuptools#1317 (comment). Looks like there will be a new approach in the pipeline over the next 18 months. In the meantime, I'll try getting our setup_requires working appropriately.

@pelson
Copy link
Member

pelson commented May 22, 2018

I've opened #108 to fix this. It should go into v2.0.2 if we decide to go down that approach.

Thanks for the report @mhidas.

@mhidas
Copy link
Author

mhidas commented May 23, 2018

Thanks for the fix!

@hengqiali
Copy link

Thanks @mhidas. Naturally, pip install cython addresses the problem in the short term.
In the slightly longer-term, cf_units needs to implement it's setup.py a little more carefully to handle the case when cython is not already installed.

Thanks!It works for me to 'No Module named Cython'

@rzr
Copy link

rzr commented May 8, 2020

or update pip as suggested at;

rzr/sense-hat-webthing#3 (comment)

CellProfiler/centrosome#78

@MISSIVA20
Copy link

MISSIVA20 commented Jun 17, 2020

from Cython.Build import cythonize
ModuleNotFoundError: No module named 'Cython'
i have this error,
i make this cmd:
pip install --upgrade cython
and pip install cython
python PythonAPI/setup.py build_ext install
but i have same error do you have a solution

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

No branches or pull requests

5 participants