Skip to content
huangjingxian edited this page Jul 18, 2017 · 1 revision

Today I want to write something about the python2 environment on Mac, which is a huge problem and sometimes disastrous. It starts when I tried to install Cython for python2. I used

pip install cython

There was no error or warning. But I could’t import Cython. It always shows:

No module named “Cython”

And After searching google, I realize it was because I didn’t set the environment path for python2.

The methods are

Method1: Type: import sys sys.path.append(“/home/me/mydir”) in python2

Clone this wiki locally