hoangKnLai / vscode-ipython

VSCode Extension integrating Editor with IPython console.
MIT License
18 stars 5 forks source link

Make ipython executable configurable #20

Closed W4RH4WK closed 1 year ago

W4RH4WK commented 1 year ago

Hey there. Please make the ipython executable used by the extension configurable.

Furthermore, it should default to ipython.exe on Windows.

hoangKnLai commented 1 year ago

Hi! Just to clarify, are you having trouble setting PATH such that ipython.exe is recognized by the terminal such as bash for example? If so, you might want to take a look at:

Basically, this IPython extension simply "borrows" the current Python environment on your active terminal to startup the ipython.exe. The ipython.exe then overload the terminal. So you can always control which ipython.exe to use by setting the terminal PATH variable to point to the exact ipython.exe to use. At the moment, I prefer the extension does not supersede the terminal PATH variable since this is already well handle by vscode terminal options.

Generally, python software is better written using virtualenv so you might want to take a look setting up virtualenv. MS Python extension already has quite a good support for the virtualenv. Note that the virtualenv can be setup to contains your specific ipython.exe and all other packages you might need for your project.

W4RH4WK commented 1 year ago

Alright, thanks for the clarification. The Python setup(s) on my machine are a bit over-complicated since I do have to use different versions of Python (some with custom patches) to get certain software (mainly AI image upscaling stuff) to work properly. I've also run into issues with virtualenv because of which I typically don't use it for small projects that don't have any dependencies beyond the standard library.

I'll just set the path appropriately for VSCode.