TM2, python, miniconda environment

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

TM2, python, miniconda environment

Claus13
Hello TM2 users,

just created a miniconda environment called `py37` which I activate via `conda activate py37`. In my endeavour to tell TM2 how to execute a python code with this environment I found this stackoverflow "solution": https://stackoverflow.com/a/8989779

If this is the way to go – I am a novice and need some help:
        - assuming I put this into `/usr/local/bin/`
        - I guess the file extension is sh and I call it via `sh wrapperscript.sh`? -- is this somehow affected by the new shell in Terminal in Catalina?
        - is "MY-ENV" = "py37" in my case? -- or should this be replaced with  `conda activate py37`?
        - what does "$@" mean

If this is not the way to go, then what should I do? ;-)

Thanks for your help.
Cheers,
Claus

_______________________________________________
TextMate mailing list
[hidden email]
https://lists.macromates.com/listinfo/textmate
Reply | Threaded
Open this post in threaded view
|

Re: TM2, python, miniconda environment

Rob McBroom-4

On 20 Nov 2019, at 15:02, Claus wrote:

Hello TM2 users,

just created a miniconda environment called `py37` which I activate via `conda activate py37`. In my endeavour to tell TM2 how to execute a python code with this environment I found this stackoverflow "solution": https://stackoverflow.com/a/8989779

That is not the way to go. Honestly, I doubt the accepted answer will even work.

You don’t need to “activate” a virtual environment to use it (and neither does TextMate). You just need to tell it where the right Python executable is. I would set TM_PYTHON in a .tm_properties file as described in my answer on Stack Overflow.

--
Rob McBroom



_______________________________________________
TextMate mailing list
[hidden email]
https://lists.macromates.com/listinfo/textmate