Sublime Text console: Python Package import failing, despite their presence

我的梦境 提交于 2019-12-12 04:05:56

问题


I am very new to SublimeText3.

I have Anaconda setup in my system and all the packages such as numpy, pandas and others are installed in /home/sam/anaconda/lib/site_packages..

Since my package distribution is in Anaconda's site packages, I created a new build system in sublime Text pointing to the Anaconda's Distribution. Now when I build the complete code- my imports, such as ..

import numpy 
import pandas 

works fine.

However, When I manually run the imports in the console of the sublime text. I see the below error.

>>> import numpy
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named 'nump

But, When I import packages like os, glob and others, I see no error.

I am not sure how to proceed, I would really appreciate any guidance.


回答1:


The Sublime Text console is an interactive console to its internal Python runtime, which is entirely separate from your system's Python. Or Anaconda's Python for that matter.

If you want an interactive console for your system Python within Sublime Text, you should check out the SublimeREPL package.



来源:https://stackoverflow.com/questions/34887383/sublime-text-console-python-package-import-failing-despite-their-presence

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!