我正在veracrypt中设置一个项目,当我尝试设置环境时,它抛出了此错误。
admin@kali:/media/veracrypt1$ virtualenv --python=python3 venv
Already using interpreter /usr/bin/python3
Using base prefix '/usr'
New python executable in /media/veracrypt1/venv/bin/python3
Also creating executable in /media/veracrypt1/venv/bin/python
Traceback (most recent call last):
File "/usr/local/bin/virtualenv", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.7/dist-packages/virtualenv.py", line 870, in main
symlink=options.symlink,
File "/usr/local/lib/python3.7/dist-packages/virtualenv.py", line 1162, in create_environment
install_python(home_dir, lib_dir, inc_dir, bin_dir, site_packages=site_packages, clear=clear, symlink=symlink)
File "/usr/local/lib/python3.7/dist-packages/virtualenv.py", line 1672, in install_python
os.symlink(py_executable_base, full_pth)
PermissionError: [Errno 1] Operation not permitted: 'python3' -> '/media/veracrypt1/venv/bin/python'
我试图寻找问题的根源,似乎与它如何成为权限有限的虚拟驱动器有关
admin@kali:/media/veracrypt1$ ln -s testfile
ln: failed to create symbolic link './testfile': Operation not permitted
看起来您是在权限有限的环境中运行它。
有些人在Linux上运行时报告了这种行为,
但是在挂载到"FAT32"分区的文件夹中 -
参见Chris Lope的博客文章:
permissionerror:不允许[errno 1]操作
我在Ubuntu VM
中以类型"vboxsf"挂载到主机操作系统 (Windows-NTFS(的文件夹中运行时遇到过这种行为。
通过移动到本机 Unix 分区中工作来解决它。