添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

FileExistsError: [Errno 17] File exists: '/root/analytics/venv-nerapi/lib/python3.6/lib-dynload' while creating virtual environment

Ask Question

Above command gives following error.

Running virtualenv with interpreter /usr/local/bin/python3.6m
Using base prefix '/usr/local'
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/virtualenv.py", line 352, in copyfile
    os.symlink(srcpath, dest)
FileExistsError: [Errno 17] File exists: '/usr/local/lib/python3.6/lib-dynload' -> '/root/analytics/venv-nerapi/lib/python3.6/lib-dynload'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/virtualenv.py", line 2343, in <module>
    main()
  File "/usr/local/lib/python3.6/site-packages/virtualenv.py", line 712, in main
    symlink=options.symlink)
  File "/usr/local/lib/python3.6/site-packages/virtualenv.py", line 927, in create_environment
    site_packages=site_packages, clear=clear, symlink=symlink))
  File "/usr/local/lib/python3.6/site-packages/virtualenv.py", line 1132, in install_python
    copyfile(join(stdlib_dir, fn), join(lib_dir, fn), symlink)
  File "/usr/local/lib/python3.6/site-packages/virtualenv.py", line 355, in copyfile
    copyfileordir(src, dest, symlink)
  File "/usr/local/lib/python3.6/site-packages/virtualenv.py", line 330, in copyfileordir
    shutil.copytree(src, dest, symlink)
  File "/usr/local/lib/python3.6/shutil.py", line 315, in copytree
    os.makedirs(dst)
  File "/usr/local/lib/python3.6/os.py", line 220, in makedirs
    mkdir(name, mode)
FileExistsError: [Errno 17] File exists: '/root/analytics/venv-nerapi/lib/python3.6/lib-dynload'

I followed following Github issue thread but din't find any luck. Could any body tell whats went wrong ? Thanks

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.