我在VS Code中有来自Microsoft软件包的Python。 当我运行一些Python代码时,出现错误:
pydev debugger: Unable to find real location for: threading.py
pydev debugger: Unable to find real location for: C:\Users\abukreev\AppData\Roaming\Python\Python36\site-packages
pydev debugger: Unable to find real location for: <frozen importlib._bootstrap>
pydev debugger: Unable to find real location for: genericpath.py
pydev debugger: Unable to find real location for: ntpath.py
pydev debugger: Unable to find real location for: runpy.py
pydev debugger: Unable to find real location for: pkgutil.py
pydev debugger: Unable to find real location for: <frozen importlib._bootstrap_external>
pydev debugger: Unable to find real location for: urllib\parse.py
pydev debugger: Unable to find real location for: queue.py
笔记本电脑上C:\Users\abukreev\Documents\Python367\.
中的Python
但是pydev在C:\Users\abukreev\AppData\Roaming\Python\Python36\site-packages
中等待它
如何更改pydev
设置?
答案 0 :(得分:1)
我遇到同样的问题。我使用安装程序而非zip文件重新安装python。
Python3.7.6下载链接是 https://www.python.org/ftp/python/3.7.6/python-3.7.6-amd64.exe
答案 1 :(得分:0)
这可能是扩展本身的问题。但是,您可以确保名为PYTHONPATH
的环境变量指向您的python文件夹:C:\Users\abukreev\Documents\Python367\
和C:\Users\abukreev\Documents\Python367\lib
。
PYTHONPATH
变量告诉系统在哪里可以找到python模块。如果您的环境中没有任何PYTHONPATH
变量,则应自己添加它。
在此处阅读以获取更多说明:https://www.tutorialspoint.com/python3/python_environment.htm