Troubleshoot problems with Pydev not importing certain modules on Mac

Source: Internet
Author: User

A burst of knowledge in the bad, yesterday suddenly opened the Mac on the Pydev found that some modules can not be introduced correctly, very strange phenomenon =. =

Later found himself in the pip when accidentally under a python2.7.10 and OpenCV to rely on this version of Python! The python2.7.6 that comes with this machine is the version of the default installation module via PIP.

2.7.6 can introduce scipy, matplotlib but not with Cv2, and 2.7.10 can only introduce Neurolab,cv2.

I don't know what's going on in Pydev. Other modules can be introduced in addition to SciPy, Neurolab and matplotlib, so the problem to be solved is how to introduce scipy and matplotlib modules.

Workaround:

1. First turn on the python2.7.6 of the machine in the terminal

haorandemacbook-pro:~ Haoran$python

2. Loading the scipy and Matplotlib modules

Import Scipyimport Matplotlib
3. Path to output scipy and matplotlib modules

>>> Print scipy.__file__/system/library/frameworks/python.framework/versions/2.7/extras/lib/python/ scipy/__init__.pyc>>> Print matplotlib.__file__/system/library/frameworks/python.framework/versions/2.7 /extras/lib/python/matplotlib/__init__.pyc
4. Copy the paths of the two separately (__init__.pyc Remove)

5. Open Eclipse-> Preferences->pydev->interpreter-python->libraries->new

6. Press Command+shift +g and paste the path you just made

7. Click Apply

8. In forced Builtins also click Apply, last OK

9. Repeat the above steps in the terminal to open the python2.7.10 and import the Neurolab module


Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Troubleshoot problems with Pydev not importing certain modules on Mac

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.