简体   繁体   中英

VS Code - python cannot open extention file no such file or directory

I am using python in Visual Studio Code and need to install notebook. When I clicked the install button popped up

在此处输入图片说明

it just gives me the error saying no such file or directory. The file is actually in the directory but the path doesn't look right because there are no slashes separating the file names.

在此处输入图片说明

The actual path is supposed to be C:\\Users\\ningm.vscode\\extensions\\ms-python.python-2020.8.108011\\pythonFiles\\pyvsc-run-isolated.py where I can actually find the file

在此处输入图片说明

How can I fix this?

Assuming you are using bash as your cmd prompt this worked for me on windows 10.

Type "powershell" into the cmd prompt to open the powershell prompt. Then just pip install ipykernel or try to open the file in vs code and it will prompt you to install it. Once complete just enter "exit" into the powershell prompt to get back to bash.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM