admin管理员组

文章数量:1278855

a few months ago, I switched from Spyder to VS Code. One of the main reasons was the integration of Jupyter notebooks (as a plugin) and presumably better debugging functionality. Also it seemed to me, that the package manager uv (which I also wanted to start exploring) was more accessible with the terminals in VS Code (it's great btw).

I am quite used to the spyder workflow and its ipython integration (F5 to run files, F9 to execute selected code, etc.). Hence, I wanted to continue coding like that and with the ipython plugin in VS Code, this was indeed possible. Actually, I was very happy how CS Code, ipython and uv fitted well together.

However, for some reason my system stopped working a few days ago and I have no idea what has caused this issue. Whenever I try to create a new dedicated ipython terminal, I get the following error message in the terminal:

PS C:\Users\path_to_code> ipython --no-autoindent --InteractiveShellApp.exec_lines="%load_ext autoreload" --InteractiveShellApp.exec_lines="%autoreload 2"
ipython : Die Benennung "ipython" wurde nicht als Name eines Cmdlet, einer Funktion, einer Skriptdatei oder eines ausführbaren Programms erkannt. Überprüfen Sie die Schreibweise des Namens, oder ob der Pfad 
korrekt ist (sofern enthalten), und wiederholen Sie den Vang.
In Zeile:1 Zeichen:1
+ ipython --no-autoindent --InteractiveShellApp.exec_lines="%load_ext a ...
+ ~~~~~~~
    + CategoryInfo          : ObjectNotFound: (ipython:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Sorry, it's in German. It translates to something like this:

PS C:\Users\path_to_code> ipython --no-autoindent --InteractiveShellApp.exec_lines=“%load_ext autoreload” --InteractiveShellApp.exec_lines="%autoreload 2”
ipython : The term 'ipython' was not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name and make sure that the path, 
if any, is correct, and then try the operation again.
In line:1 char:1
+ ipython --no-autoindent --InteractiveShellApp.exec_lines="%load_ext a...
+ ~~~~~~~
+ CategoryInfo : ObjectNotFound: (ipython:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

OS is obviously windows. Has anyone a similar setup and had to deal with this problem?

a few months ago, I switched from Spyder to VS Code. One of the main reasons was the integration of Jupyter notebooks (as a plugin) and presumably better debugging functionality. Also it seemed to me, that the package manager uv (which I also wanted to start exploring) was more accessible with the terminals in VS Code (it's great btw).

I am quite used to the spyder workflow and its ipython integration (F5 to run files, F9 to execute selected code, etc.). Hence, I wanted to continue coding like that and with the ipython plugin in VS Code, this was indeed possible. Actually, I was very happy how CS Code, ipython and uv fitted well together.

However, for some reason my system stopped working a few days ago and I have no idea what has caused this issue. Whenever I try to create a new dedicated ipython terminal, I get the following error message in the terminal:

PS C:\Users\path_to_code> ipython --no-autoindent --InteractiveShellApp.exec_lines="%load_ext autoreload" --InteractiveShellApp.exec_lines="%autoreload 2"
ipython : Die Benennung "ipython" wurde nicht als Name eines Cmdlet, einer Funktion, einer Skriptdatei oder eines ausführbaren Programms erkannt. Überprüfen Sie die Schreibweise des Namens, oder ob der Pfad 
korrekt ist (sofern enthalten), und wiederholen Sie den Vang.
In Zeile:1 Zeichen:1
+ ipython --no-autoindent --InteractiveShellApp.exec_lines="%load_ext a ...
+ ~~~~~~~
    + CategoryInfo          : ObjectNotFound: (ipython:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Sorry, it's in German. It translates to something like this:

PS C:\Users\path_to_code> ipython --no-autoindent --InteractiveShellApp.exec_lines=“%load_ext autoreload” --InteractiveShellApp.exec_lines="%autoreload 2”
ipython : The term 'ipython' was not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name and make sure that the path, 
if any, is correct, and then try the operation again.
In line:1 char:1
+ ipython --no-autoindent --InteractiveShellApp.exec_lines="%load_ext a...
+ ~~~~~~~
+ CategoryInfo : ObjectNotFound: (ipython:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

OS is obviously windows. Has anyone a similar setup and had to deal with this problem?

Share Improve this question asked Feb 24 at 15:20 gruenkohlgruenkohl 1131 silver badge8 bronze badges 2
  • 2 The error is telling you that ipython is not found. You either don't have it installed or it is not in your PATH. How did you install it before? – InSync Commented Feb 24 at 15:27
  • I have installed it using uv uv add --dev ipykernel and uv add ipython. – gruenkohl Commented Feb 24 at 15:43
Add a comment  | 

1 Answer 1

Reset to default 1

uv add adds the dependency (here ipython) to the current project and installs it to that project's virtual environment (the .venv directory).

You need to either ask uv to run it for you:

$ uv run ipython

...or activate the environment manually:

$ .venv/Scripts/activate
$ ipython

本文标签: pythonVS Codeipython and uvStack Overflow