Atom-script: Specify path to Python in settings

Created on 17 Mar 2015  路  9Comments  路  Source: atom-community/atom-script

Hi,

On osx 10.10, I'm trying to use python3.4 with atom (macports install in /opt/local/bin/python3.4) by default, but i cant find a proper way than :

  • cmd+maj+I : command = /opt/local/bin/python3.4, but i need to do that at each launch of atom
    OR
  • set shebang to "#!/usr/bin/env python3.4", modify "python" path to > python3.4 in zsh and edit launchctl to pass vars.
    (https://github.com/rgbkrk/atom-script/issues/61#issuecomment-37337827)
    OR
  • set shebang to absolute path of my python3.4 install which make my script less portable.

Can you set an option to specify path to exec interpreter saved once for all ?

Have a nice day.

Most helpful comment

Did you try to use new "profile" feature? You can see how it works here, in top post #750

I was wondering whether it is possible to find some examples how the profile feature should be configured. For example, when working with two Python versions available in:

C:\Python27
C:\Python35-32

How the _profile_ window below should be configured to provide a convenient switching mechanisms for running scripts in each version.

window

All 9 comments

Is python3.4 in your PATH? Have tried creating a symlink to it?

Same problem here: several version of python installed; script chooses the wrong one :(

Same here, would be great to be able to save the configuration once and for all

i tried that also didnt work

Did you try to use new "profile" feature? You can see how it works here, in top post https://github.com/rgbkrk/atom-script/pull/750

Did you try to use new "profile" feature? You can see how it works here, in top post #750

I was wondering whether it is possible to find some examples how the profile feature should be configured. For example, when working with two Python versions available in:

C:\Python27
C:\Python35-32

How the _profile_ window below should be configured to provide a convenient switching mechanisms for running scripts in each version.

window

Did you manage to do it ?

@ABUISSON No, I actually came back to vim.

In my Ubuntu I manage it by insert in "command" the path to my executable python file, e.g. /home/user/anaconda3/envs/anaconda2/bin/python2.7. Then, I have saved it as profile named 'python2'. Now when I press shift-ctrl-alt-b and hit the 'run' button I run my code in the active window using python2.7. Using ctrl-alt-b I run my code using my default python version, i.e 3.6.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

CHOW1997 picture CHOW1997  路  7Comments

ghost picture ghost  路  5Comments

ChenZhongPu picture ChenZhongPu  路  3Comments

GrantTarbell picture GrantTarbell  路  4Comments

haollhao picture haollhao  路  6Comments