gpt4 book ai didi

python - [Python]创建虚拟环境失败

转载 作者:行者123 更新时间:2023-12-04 19:31:03 25 4
gpt4 key购买 nike

我试图用 python3 在我的 vagrant centos7 上创建一个 virtualenv,然后发生了以下情况。我能用它做些什么吗? virtualenv 的版本是 13.1.2,python 是 3.5.1。谢谢。

$ virtualenv -p python3 venv
Running virtualenv with interpreter /usr/local/bin/python3
Using base prefix '/usr/local'
Traceback (most recent call last):
File "/usr/local/lib/python3.5/site-packages/virtualenv.py", line 2363, in <module>
main()
File "/usr/local/lib/python3.5/site-packages/virtualenv.py", line 832, in main
symlink=options.symlink)
File "/usr/local/lib/python3.5/site-packages/virtualenv.py", line 994, in create_environment
site_packages=site_packages, clear=clear, symlink=symlink))
File "/usr/local/lib/python3.5/site-packages/virtualenv.py", line 1192, in install_python
copy_required_modules(home_dir, symlink)
File "/usr/local/lib/python3.5/site-packages/virtualenv.py", line 1131, in copy_required_modules
copyfile(filename, dst_filename, symlink)
File "/usr/local/lib/python3.5/site-packages/virtualenv.py", line 468, in copyfile
os.makedirs(os.path.dirname(dest))
File "/usr/local/lib/python3.5/os.py", line 241, in makedirs
mkdir(name, mode)
FileExistsError: [Errno 17] File exists: 'venv/lib/python3.5/lib-dynload'

最佳答案

这可能是共享文件夹中符号链接(symbolic link)的问题。我通过简单地创建 venv 来解决它在共享文件夹之外。

关于python - [Python]创建虚拟环境失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34428141/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com