$ 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安装,pipenv shell),但不确定它有多么简单
另外:由于输出控制台中的错误消息,我不得不从.bashrc文件中删除 thefuck 项目的这些行(也许安装/ pip软件包已被删除)
eval $(thefuck --alias)
# You can use whatever you want as an alias, like for Mondays:
eval $(thefuck --alias FUCK)
答案 0 :(得分:0)
这是我当前的解决方法,但对于通用案例而言,我认为它不够好
为什么它会继续在恒定的文件夹名称Idan-iyfIpKqV中创建虚拟环境?
int result = (unity*100) + (tens*10) + hundreds;
System.out.println(result);