Atom with Anaconda's Python and Anaconda's Python packages?


#1

Hi, all:

I wonder, how to specify my own python executable, as well as my own python packages, instead of the packages from the system when I use Atom IDE?

The reason why I need this is because I now have 2 versions of Python,

  • Anaconda

  • From system repository

It seems “modify init.coffee” to
process.env.PATH = ['~/anaconda3/bin', process.env.PATH].join(':')
is able to solve the problem??
However, when I tried to debug in atom, such as “Goto Definition”, it still pops up a file from /usrl/local/lib/python3.5, instead of ~/anaconda3/pkgs , what can we do?

Cheers
Pei


#2

The best way is to run under conda virtual enviorment.
Conda comes with its own virtual enviorment named root by default in latest version ,

enter into conda enviorment and :
source ./conda/bin/activate root
run atom


#3

wow… such prompt reply… Great… I’m now running atom from conda’s own environment, and it seems atom is now able to find the correct path. That’s great…Thank you very much…

However, I still obtain the follow error message:

Error: Traceback (most recent call last): File “/home/jiapei/anaconda3/envs/tensorenv/bin/pylint”, line 3, in run_pylint() File “/home/jiapei/anaconda3/envs/tensorenv/lib/python3.5/site-packages/pylint/init.py”, line 22, in run_pylint from pylint.lint import Run File “/home/jiapei/anaconda3/envs/tensorenv/lib/python3.5/site-packages/pylint/lint.py”, line 44, in import astroid File “/home/jiapei/anaconda3/envs/tensorenv/lib/python3.5/site-packages/astroid/init.py”, line 54, in from astroid.nodes import * File “/home/jiapei/anaconda3/envs/tensorenv/lib/python3.5/site-packages/astroid/nodes.py”, line 54, in from astroid.scoped_nodes import ( File “/home/jiapei/anaconda3/envs/tensorenv/lib/python3.5/site-packages/astroid/scoped_nodes.py”, line 35, in from astroid import manager File “/home/jiapei/anaconda3/envs/tensorenv/lib/python3.5/site-packages/astroid/manager.py”, line 29, in from astroid import modutils File “/home/jiapei/anaconda3/envs/tensorenv/lib/python3.5/site-packages/astroid/modutils.py”, line 35, in from distutils.sysconfig import get_python_lib File “/home/jiapei/anaconda3/envs/tensorenv/lib/python3.5/site-packages/numpy/distutils/init.py”, line 8, in from . import ccompiler File “/home/jiapei/anaconda3/envs/tensorenv/lib/python3.5/site-packages/numpy/distutils/ccompiler.py”, line 11, in from distutils.errors import DistutilsExecError, DistutilsModuleError, \ ImportError: No module named 'distutils.errors’
Error: Traceback (most recent call last):
File “/home/jiapei/anaconda3/envs/tensorenv/bin/pylint”, line 3, in
run_pylint()
File “/home/jiapei/anaconda3/envs/tensorenv/lib/python3.5/site-packages/pylint/init.py”, line 22, in run_pylint
from pylint.lint import Run
File “/home/jiapei/anaconda3/envs/tensorenv/lib/python3.5/site-packages/pylint/lint.py”, line 44, in
import astroid
File “/home/jiapei/anaconda3/envs/tensorenv/lib/python3.5/site-packages/astroid/init.py”, line 54, in
from astroid.nodes import *
File “/home/jiapei/anaconda3/envs/tensorenv/lib/python3.5/site-packages/astroid/nodes.py”, line 54, in
from astroid.scoped_nodes import (
File “/home/jiapei/anaconda3/envs/tensorenv/lib/python3.5/site-packages/astroid/scoped_nodes.py”, line 35, in
from astroid import manager
File “/home/jiapei/anaconda3/envs/tensorenv/lib/python3.5/site-packages/astroid/manager.py”, line 29, in
from astroid import modutils
File “/home/jiapei/anaconda3/envs/tensorenv/lib/python3.5/site-packages/astroid/modutils.py”, line 35, in
from distutils.sysconfig import get_python_lib
File “/home/jiapei/anaconda3/envs/tensorenv/lib/python3.5/site-packages/numpy/distutils/init.py”, line 8, in
from . import ccompiler
File “/home/jiapei/anaconda3/envs/tensorenv/lib/python3.5/site-packages/numpy/distutils/ccompiler.py”, line 11, in

Any further suggestions?

Cheers
Pei


#4

make sure astroid is properly install inside conda.


#5

will you please elaborate?. I’m having a similar issue to Pei. will this work for windows machine.
and you’re referring this cmd line to be used in cmd window correct (source ./conda/bin/activate root)
thank you in advance

my anaconda package are in my c drive under C:/Anaconda2
cheers
A


#6

can you clarify your question what should i elaborate ?
we are talking about how to run it under Linux here. I don’t work using windows so please reference to windows documentation of anaconda’s virtualenv .


#7

What do I enter if I am with Windows?


#8

See above.