centos下,python安装virtualenv时报错
PHPz
PHPz 2017-04-17 17:35:16
0
2
546

现在发现pip安装不了东西了,错误也是下面那个
在终端输入pip install virtualenv安装virtualenv报错,错误如下

Exception:
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/pip/basecommand.py", line 223, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/site-packages/pip/commands/install.py", line 308, in run
    strip_file_prefix=options.strip_file_prefix,
  File "/usr/lib/python2.7/site-packages/pip/req/req_set.py", line 646, in install
    **kwargs
  File "/usr/lib/python2.7/site-packages/pip/req/req_install.py", line 816, in install
    strip_file_prefix=strip_file_prefix
  File "/usr/lib/python2.7/site-packages/pip/req/req_install.py", line 1013, in move_wheel_files
    strip_file_prefix=strip_file_prefix,
  File "/usr/lib/python2.7/site-packages/pip/wheel.py", line 339, in move_wheel_files
    clobber(source, lib_dir, True)
  File "/usr/lib/python2.7/site-packages/pip/wheel.py", line 317, in clobber
    shutil.copyfile(srcfile, destfile)
  File "/usr/lib64/python2.7/shutil.py", line 83, in copyfile
    with open(dst, 'wb') as fdst:
IOError: [Errno 13] Permission denied: '/usr/lib/python2.7/site-packages/virtualenv.py'
PHPz
PHPz

学习是最好的投资!

membalas semua(2)
黄舟
with open(dst, 'wb') as fdst

Seperti dalam ayat di atas, pip perlu menulis beberapa fail semasa memasang perpustakaan, jadi 写入权限 diperlukan Jika mengikut kaedah di atas, menambah pip sebelum arahan sudo masih tidak berfungsi , anda boleh mempertimbangkan untuk menambah /usr/lib/python2.7/Tukar kebenaran direktori kepada 666 atau 777:

chmod 777 /usr/lib/python2.7
阿神

Kebenaran ditolak

Isu kebenaran, tambah sudo

Muat turun terkini
Lagi>
kesan web
Kod sumber laman web
Bahan laman web
Templat hujung hadapan