$ where python
C:\Users\Idan\AppData\Local\Programs\Python\Python38\python.exe
C:\Users\Idan\AppData\Local\Microsoft\WindowsApps\python.exe错误:
Idan@DESKTOP-A16D3QA MINGW64 ~/Desktop/ttt
$ C:\Users\Idan\AppData\Local\Programs\Python\Python38\python.exe -u "c:\Users\Idan\AppData\Local\Programs\Python\Python38\s.py"
bash: C:UsersIdanAppDataLocalProgramsPythonPython38python.exe: command not found耳聋设置json文件:
// Path to the pipenv executable to use for activation.
"python.pipenvPath": "pipenv",
// Path to the poetry executable.
"python.poetryPath": "poetry",
// Path to Python, you can use a custom version of Python by modifying this setting to include the full path.
"python.pythonPath": "python",settings.json
我试图做的事情(集成pipenv而不是venv):
"python.pythonPath": "C:\\Users\\Idan\\AppData\\Local\\Programs\\Python\\Python38\\python.exe",
"python.pipenvPath": "pipenv",
"python.testing.pytestEnabled": true,
"python.venvPath": "C:\\Users\\Idan\\.virtualenvs",
],
"code-runner.executorMap": {
"python": "$pythonPath -u $fullFileName"
},
"terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe",我尝试过的其他配置导致了相同的错误
"python.venvPath": "C:\\Users\\Idan\\.virtualenvs",
// this is the actual locatation
// of the pythonpath C:\\Users\\Idan\\.virtualenvs\\Idan-iyfIpKqV\Scripts\python.exe
"python.pythonPath": "$venvPath\\pipenvPath\\Scripts\\python.exe",
//"python.pythonPath": "$venvPath\\ENV-NAME\\Scripts\\python.exe",这是我拥有的完整的settings.json:https://gist.github.com/IdanBanani/0d562770f14f3098debb6e1d47179e3f
以前,结合这两个来源的行是有效的(venv):https://github.com/CoreyMSchafer/dotfiles/blob/master/settings/VSCode-Settings.json https://github.com/xames3/xai_django/blob/bcaf169837d484d0bcf8686c18dc0529d1469034/.vscode/settings.json
但我试图替换为pipenv,并可能在将来尝试将其自动设置为创建和激活virtualenv (pipenv install,pipenv shell),但不确定它有多简单。
另外:由于输出控制台中的错误消息(可能安装/pip包被删除),我不得不从该死的项目中删除这些行。
eval $(thefuck --alias)
# You can use whatever you want as an alias, like for Mondays:
eval $(thefuck --alias FUCK)发布于 2020-05-20 11:42:53
这是我目前的解决办法,但我不认为它足够适合通用案例
为什么它总是在常量文件夹Idan-iyfIpKqV中创建虚拟env?
"python.venvPath": "C:/Users/Idan/.virtualenvs",
"python.pythonPath": "C:/Users/Idan/.virtualenvs/Idan-iyfIpKqV/Scripts/python.exe",https://stackoverflow.com/questions/61891253
复制相似问题