把虚拟环境的 scripts 目录下所有 text 格式的文件中路径都更改了;如果安装 python 的话,虚拟环境运行里面的脚本 ok,但是把 python 卸载掉,就会报错:
Failed to import the site module
Traceback (most recent call last):
File "C:\Users\E\Desktop\moduleTest\venv\lib\site.py", line 791, in <module>
main()
File "C:\Users\E\Desktop\moduleTest\venv\lib\site.py", line 768, in main
paths_in_sys = addsitepackages(paths_in_sys)
File "C:\Users\E\Desktop\moduleTest\venv\lib\site.py", line 280, in addsitepackages
addsitedir(sitedir, known_paths)
File "C:\Users\E\Desktop\moduleTest\venv\lib\site.py", line 211, in addsitedir
addpackage(sitedir, name, known_paths)
File "C:\Users\E\Desktop\moduleTest\venv\lib\site.py", line 179, in addpackage
exec(line)
File "<string>", line 1, in <module>
File "C:\Users\E\Desktop\moduleTest\venv\lib\importlib\util.py", line 13, in <module>
from contextlib import contextmanager
ImportError: No module named 'contextlib'