Sublime text 2 can not find any python module

Sublime text 2 can not find any python module



I am leaning programming now and get stuck in the very beginning.



I have sublime text 2 installed on my Mac, and I type some python code in and it runs. However, when I start to import module like pandas/matplotlib, it can not find those modules. Certainly I have used pip to install them.



So what is the solution please?




1 Answer
1



Does Your code work with those modules when You use a different editor?



If it doesn't, Check if the modules You need are indeed installed. You can do this either by using the python prompt:


python
>>> help("modules")
>>> exit()



or using pip:


pip freeze



(sorry for posting this as an answer, but I'm currently not able to post comments)





thanks for your reply. Sublime Text 2 gives importError: No module named pandas, whereas when I type code in terminal in MAC, it doesn't complain
– Victor
Aug 23 at 10:40






Checkout this post: stackoverflow.com/questions/27179268/….
– SpitGlued
Aug 23 at 10:56





I have created another build file, as my terminal is showing python 2.7.11 and sublime text 2 showing 2.7.10, but it doesn't help
– Victor
Aug 23 at 12:18





did You try to change the PYTHONPATH variable like is suggested in the article above: Once Anaconda is installed, its Python distribution supercedes the Python distribution that ships with OS X. You've installed Pandas on the former distribution (or rather, it's come pre-installed), while Sublime Text is relying on the latter distribution to build and run. You'll want to modify Sublime Text to use the Python distribution from Anadonda. You can modify Python.sublime-settings as shown in stackoverflow.com/questions/8574919/…
– SpitGlued
Aug 23 at 13:17






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

Edmonton

Crossroads (UK TV series)