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
In your Anaconda terminal, activate your Conda environment and then run atom --new-instance
For using Python cmd (anaconda environment) in Atom :-
Install "autocomplete-python" package in Atom. { Welcome Guide -> Install a Package -> Open Istaller -> Install -> (Search) autocomplete-python -> Install }
Install "platformio-ide-terminal" package in Atom. { Welcome Guide -> Install a Package -> Open Istaller -> Install -> (Search) platformio-ide-terminal -> Install }
Then, Open Platformio-Ide-Terminal Settings { Welcome Guide -> Install a Package -> Open Istaller -> Packages -> platformio-ide-terminal -> settings }.
Change Shell Override to "C:\WINDOWS\system32\cmd.exe" . {platformio-ide-terminal -> settings -> Core -> Shell Override}
Now, you can see a plus(+) sign at left down corner side of Atom editor. Click on that plus(+) sign, cmd terminal will open on atom.
Use "cd" command to go into anaconda folder.
Then type "python", now you will see the python version in your terminal.
example:
C:\Users\Ankush>cd anaconda3
C:\Users\Ankush\Anaconda3>python
Python 3.6.1 |Anaconda 4.4.0 (64-bit)| (default, May 11 2017, 13:25:24) [MSC v.1900 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information.
print("Hello World") Hello World
Thanks
Ankush
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!
I had this same issue, and after some exploring, found that this worked well:
There is a file (I'm on macOS Catalina 10.15.3):
~/.atom/packages/platformio-ide-terminal/lib/platformio-ide-terminal.coffee
Look for the autoRunCommand section:
autoRunCommand:
title: 'Auto Run Command'
description: 'Command to run on terminal initialization.'
type: 'string'
default: ''
If you set the default to:
'export PATH=~/opt/anaconda3/bin:$PATH'
platformio will execute this command every time you start Atom, and it will use the default anaconda python, as specified in the new PATH.
You can then type "conda activate myenvironment" in the platformio terminal and it will work like normal (switch between environments, install packages, etc.). Hope this helps.
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:
python -m ipykernel install --user --name YourEnvName
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
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!