Bugfix: Permission denied when pip install virtualenv 03/34103/1
authorxudan <xudan16@huawei.com>
Wed, 3 May 2017 06:31:20 +0000 (06:31 +0000)
committerxudan <xudan16@huawei.com>
Wed, 3 May 2017 06:31:20 +0000 (06:31 +0000)
JIRA: DOVETAIL-420

Collecting virtualenv
Downloading virtualenv-15.1.0-py2.py3-none-any.whl (1.8MB)
Installing collected packages: 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'

Change-Id: I7c387013739252402fa3774b1a2df241a09f24c0
Signed-off-by: xudan <xudan16@huawei.com>
jjb/dovetail/dovetail-run.sh

index fb16f6a..1b1b4d2 100755 (executable)
@@ -48,10 +48,10 @@ else
     exit 1
 fi
 
-pip install virtualenv
+sudo pip install virtualenv
 
 cd ${releng_repo}/modules
-virtualenv venv
+sudo virtualenv venv
 source venv/bin/activate
 sudo pip install -e ./ >/dev/null