Setting PATH for Sublime Text 3 Anaconda plugin

删除回忆录丶 提交于 2019-12-10 21:48:08

问题


I've been using Anaconda distribution(for NumPy,Pandas library). Recently I've tried to use Sublime Text 3. Problem is Sublime text cannot use my Anaconda installation. It is using the default python installation.

During Anaconda's installation, I've tried set it as global/default python setup and later also added anaconda/bin to my $PATH.

$ echo $PATH
/home/qfarhan/anaconda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

$ echo $PYTHONPATH 
/home/qfarhan/anaconda/bin:

$ which python
/home/qfarhan/anaconda/bin/python

But for

import request
import pandas as pd

gives the error

import requests
ImportError: No module named requests

Immediately after the error it prints a path line:

[path: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games]

Which does not contain the anaconda directory. So Sublime text 3 is using a different PATH than mine. Can someone help me to resolve this issue?

Thank you for your time.


回答1:


Try configure Python interpreter settings for Anaconda.

Please refer to Anaconda README.

Also did you start Sublime Text from the shell where you had the PATH set correctly?



来源:https://stackoverflow.com/questions/22321879/setting-path-for-sublime-text-3-anaconda-plugin

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