Using anaconda environment in Atom

假装没事ソ 提交于 2019-12-02 17:14:29

In your Anaconda terminal, activate your Conda environment and then run 'atom --new-instance'

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:

  1. Install jupyter on every conda env you want to work with
  2. Activate the first env that you wish to use on Atom
  3. Create an Ipython kernel for that env with python -m ipykernel install --user --name YourEnvName
  4. 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

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!

Anouar Benlaqlib

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!

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