问题
I've install Anaconda (Python 3.6) and tensorflow (python 3.5). I've managed to get it run both on Spyder and on sublime text 3( by making new build system). Now all the is using Atom( which I'm not used to). So I've trying to "tell" Atom to use python in the following folder:
C:\users\engine\anaconda3\envs\tensorflow\python.exe
without any success, any idea how to do that or what kind of package should I use( I'm using windows so virtualenv) thanks in advance !
回答1:
In your Anaconda terminal, activate your Conda environment and then run 'atom --new-instance'
回答2:
If you want to run some python script on different python versions using Atom, I think the best solution is to use atom's Hydrogen package and installing a kernel for every conda env you need, to do it you should open Anaconda's prompt and:
- Install jupyter on every conda env you want to work with
- Activate the first env that you wish to use on Atom
- Create an Ipython kernel for that env with
python -m ipykernel install --user --name YourEnvName
- Repeat this in all the envs you wish to work with
Sadly if you wish to use some atom's packages like flake8 or python-ide you need to launch atom (simply typing atom
on ancaconda prompt) from a conda env that has all the requirements (like python-language-server) and then you can switch between kernels with ease.
If anybody knows how to make Atom and it's packages to recognize some env without launching atom from inside that env, please share :D
回答3:
You could either use the script or hydrogen package to run code on different python interpreters. I have already used the first option with different Anaconda environments.
Good luck!
回答4:
I would guess you want to use the anaconda
command prompt inside your atom IDE
. For that you will need to add the conda.exe
and python
paths to your local variables then it should be good to go!
来源:https://stackoverflow.com/questions/43207427/using-anaconda-environment-in-atom