Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ModuleNotFoundError: No module named 'Cython'

Why does Cython not want to work ? I've pip installed it and when I try to import it, it just won't work.

I'm using MacOS Version 10.12.6 (16G29)

Here's even a screenshot:


enter image description here

like image 880
AymenTM Avatar asked Jan 27 '19 16:01

AymenTM


People also ask

How does Cython work?

Cython works by producing a standard Python module. However, the behavior differs from standard Python in that the module code, originally written in Python, is translated into C. While the resulting code is fast, it makes many calls into the CPython interpreter and CPython standard libraries to perform actual work.


1 Answers

This is possible if you have multiple versions of Python installed try:

python3.7 -m pip install cython

use which pip3 to check where it was installing the package previously


Update: OP used python3.7, if you have a different alias or a different version, you should use that instead. This is obviously installation dependent.

like image 187
Benoît P Avatar answered Oct 06 '22 13:10

Benoît P