Reputation: 1054
I was trying to create a virtualenv on my vagrant centos7 with python3 and the following happens. Is there anything I can do with it? The version of virtualenv is 13.1.2 and python is 3.5.1. Thanks.
$ 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'
Upvotes: 1
Views: 7515
Reputation: 742
You probably have already a venv, try to delete it with
rm -rf yourPath/venv
and for create a new one
python3 -m venv pathToCreateNewVenv
Upvotes: 3
Reputation: 1054
It is probably the problems with symbolic link at shared folder. I solved it by simply create the venv
outside of the shared folder.
Upvotes: 1