Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I execute python anaconda with atom 1.0

Tags:

atom-editor

I've installed atom 1.0 and I want to execute my python 3.4 from Anaconda 3. All errors are because atom not detect my anaconda packages. I don't find the file to change the settings for python to anaconda python.

like image 849
Tobal Avatar asked Jul 03 '15 18:07

Tobal


2 Answers

You can add the path to the Anaconda python to the start of your path in your init.coffee file. In the "Atom" menu, select "Open Your Init Script". Or, use Command-shift-P to open the fuzzy finder and type something along the lines of "Open Your Init Script":

enter image description here then, add something like:

 process.env.PATH = ['/Users/dan/anaconda/bin/', process.env.PATH].join(':')

to the end of init.coffee. Of course, you need to replace /Users/dan/anaconda/bin with the path to your anaconda/bin directory. If you don't already know this, try typing which python on the command line.

Once you've added the line, save init.coffee and restart Atom.

like image 190
DanHickstein Avatar answered Oct 03 '22 23:10

DanHickstein


Try starting atom from terminal. Otherwise it does not load the $PATH variable defined by anaconda in ~/.bash_profile

like image 26
Feng Mai Avatar answered Oct 03 '22 23:10

Feng Mai