mandeep / sublime-text-conda

Work with conda environments in Sublime Text 3
BSD 3-Clause "New" or "Revised" License
26 stars 10 forks source link

Request support for --prefix environments #18

Open Azerus13 opened 4 years ago

Azerus13 commented 4 years ago

HI,

I use to create conda envs using --prefix option instead of --name. So each of my projects contains their environment inside a sub-directory, as proposed here.

But there is a little drawback using --prefix instead of --name :

Conda can no longer find your environment with the --name flag. You’ll generally need to pass the --prefix flag along with the environment’s full path to find the environment.

My problem is that those --prefix environments aren't listed with "Conda: Activate Environment" inside sublime text 3. Is there a way to activate those environments ? If not, could a feature be added ?

Thanks, Thomas

Azerus13 commented 4 years ago

I worked around the problem by using a custom sublime build like: { "cmd": ["/MyEnvPath/bin/python", "$file"], "selector": "source.python", "file_regex": "^\\s*File \"(...*?)\", line ([0-9]*)" }

Thomas D

mandeep commented 4 years ago

Hi @Azerus13 thanks for letting me know. I should probably add some kind of functionality to deal with the --prefix flag so I will reopen this issue.

Azerus13 commented 4 years ago

Hi @mandeep thank you for looking to this issue ! Let me know if you do any progress on it :)