有一个我无法解决的问题。我已经设置好了:
1.用户设置
{
"atomKeymap.promptV3Features": true,
"editor.multiCursorModifier": "ctrlCmd",
"editor.formatOnPaste": true,
"python.pythonPath": "python3",
"command": "python3",
Run Code Online (Sandbox Code Playgroud)
}
2.工作区设置
{
"python.pythonPath": "${workspaceFolder}/env/bin/python3.6",
"git.ignoreLimitWarning": true
Run Code Online (Sandbox Code Playgroud)
}
3.tasks.jason文件
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "0.1.0",
"command": "python3",
"isShellCommand": true,
"args": ["${file}"],
"showOutput": "always"
Run Code Online (Sandbox Code Playgroud)
}
如果我使用调试控制台并且版本和路径正确,请 调试
但是无论我做什么,我的输出始终默认为“ python2.7”。我该如何改善? 输出
我正在开发一个 Slackbot。导入 slackclient 后,我得到了ModuleNotFoundError: No module named 'slackclient'.
我尝试了所有选项,并遵循了此处帖子中显示的建议 - Python can't findinstalled module ('slackclient')。根据这些建议,我安装了 slack,但在导入 WebClient 时出现以下错误。
>>> from slack import WebClient
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: cannot import name 'WebClient' from 'slack' (<path_to _venv>/.venv/lib/python3.7/site-packages/slack/__init__.py)
Run Code Online (Sandbox Code Playgroud)
我检查了 slack 版本,看起来还可以
slack 0.0.2
Run Code Online (Sandbox Code Playgroud)
有什么建议我可能做错了什么吗?