내 travis 스크립트에서 sudo가 비활성화되어 파이썬 패키지를 설치하기 위해 'pip install'을 실행할 수 없습니다. sudo없이 파이썬 패키지를 설치할 수있는 다른 방법이 있습니까?sudo없이 travis에 python 패키지를 설치하는 방법은 무엇입니까?
그것은 여전히 당신은 속성 install:
후 pip install
을 작성할 수 2015에서 사용 가능 저장소에 기본적으로 official doc
sudo: false
이상
에 따르면 다음 명령
install:
- pip install -U pip
- pip install <whatever>
$ pip install -U pip
You are using pip version 6.0.8, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting pip from https://pypi.python.org/packages/b6/ac/7015eb97dc749283ffdec1c3a88ddb8ae03b8fad0f0e611408f196358da3/pip-9.0.1-py2.py3-none-any.whl#md5=297dbd16ef53bcef0447d245815f5144
Downloading pip-9.0.1-py2.py3-none-any.whl (1.3MB)
100% |################################| 1.3MB 457kB/s
Installing collected packages: pip
Found existing installation: pip 6.0.8
Uninstalling pip-6.0.8:
Exception:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/pip-6.0.8-py2.7.egg/pip/basecommand.py", line 232, in main
status = self.run(options, args)
File "/usr/local/lib/python2.7/dist-packages/pip-6.0.8-py2.7.egg/pip/commands/install.py", line 347, in run
root=options.root_path,
File "/usr/local/lib/python2.7/dist-packages/pip-6.0.8-py2.7.egg/pip/req/req_set.py", line 543, in install
requirement.uninstall(auto_confirm=True)
File "/usr/local/lib/python2.7/dist-packages/pip-6.0.8-py2.7.egg/pip/req/req_install.py", line 667, in uninstall
paths_to_remove.remove(auto_confirm)
File "/usr/local/lib/python2.7/dist-packages/pip-6.0.8-py2.7.egg/pip/req/req_uninstall.py", line 126, in remove
renames(path, new_path)
File "/usr/local/lib/python2.7/dist-packages/pip-6.0.8-py2.7.egg/pip/utils/__init__.py", line 316, in renames
shutil.move(old, new)
File "/usr/lib/python2.7/shutil.py", line 297, in move
rmtree(src)
File "/usr/lib/python2.7/shutil.py", line 245, in rmtree
rmtree(fullname, ignore_errors, onerror)
File "/usr/lib/python2.7/shutil.py", line 250, in rmtree
onerror(os.remove, fullname, sys.exc_info())
File "/usr/lib/python2.7/shutil.py", line 248, in rmtree
os.remove(fullname)
OSError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/pip-6.0.8-py2.7.egg/EGG-INFO/PKG-INFO'
http://stackoverflow.com/questions/7465445/how-to-install-python-modules-without-root-access – starrify