Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sourcing Anaconda Python from Hyper Terminal

On Windows 10 how do I source/work in Python (installed via Anaconda) through the Hyper Terminal as opposed to Anaconda Prompt?

like image 394
randomcat123x Avatar asked Feb 03 '26 02:02

randomcat123x


1 Answers

You could change the shell in your Hyper settings (Ctrl+,), i.e. in your .hyper.js.

// the shell to run when spawning a new session (i.e. /usr/local/bin/fish)
// if left empty, your system's login shell will be used by default
shell: '',

If you analyse the target of your Anaconda Prompt shortcut, it probably looks similar to this:

%windir%\System32\cmd.exe "/K" C:\Users\Administrator\miniconda3\Scripts\activate.bat

So you could just use your Anaconda Prompt within Hyper:

shell: 'C:\\WINDOWS\\System32\\cmd.exe',
shellArgs: ['/K C:\\Users\\Administrator\\miniconda3\\Scripts\\activate.bat'],

Works for me. After restarting Hyper, I can see my virtual environment (base) included in my prompt, and I can use python and also conda. I'd assume it works similar with the Anaconda Powershell Prompt, but I haven't tried it yet.

like image 73
rpaulson Avatar answered Feb 04 '26 16:02

rpaulson