我正在尝试使用python 3.5在raspberry pi 3b +上安装opencv,但是由于这些文件我什至都没有编辑,所以我一直遇到相同的错误。
pi@raspberrypi:~ $ mkvirtualenv cv
Using base prefix '/usr'
Traceback (most recent call last):
File "/usr/local/bin/virtualenv", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python3.5/dist-packages/virtualenv.py", line 712, in main
symlink=options.symlink)
File "/usr/local/lib/python3.5/dist-packages/virtualenv.py", line 927, in create_environment
site_packages=site_packages, clear=clear, symlink=symlink))
File "/usr/local/lib/python3.5/dist-packages/virtualenv.py", line 1112, in install_python
mkdir(lib_dir)
File "/usr/local/lib/python3.5/dist-packages/virtualenv.py", line 324, in mkdir
os.makedirs(path)
File "/usr/lib/python3.5/os.py", line 231, in makedirs
makedirs(head, mode, exist_ok)
File "/usr/lib/python3.5/os.py", line 231, in makedirs
makedirs(head, mode, exist_ok)
File "/usr/lib/python3.5/os.py", line 241, in makedirs
mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/cv'
预先感谢
答案 0 :(得分:0)
您无权在/
(根)目录中创建目录。您可以
sudo mkvirtualenv cv
,或export WORKON_HOME=~/.virtualenvs
然后
mkvirtualenv cv