Setting PATH for Sublime Text 3 Anaconda plugin
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?
Quazi Farhan
Updated on March 12, 2020Comments
-
Quazi Farhan over 4 years
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.
-
Quazi Farhan over 10 yearsThank you. Running ST3 from the same shell has solved the problem, though I guess the root of the problem remains undiscovered. Why they are using different $PATH.
-
Mikko Ohtamaa over 10 yearsIn UNIX environment variables are inherited from the parent process to the child process. In this case, the parent process is shell and the child process Sublime Text. If you change environment variables in some other process (other shell) they cannot be magically reflected across the system.