20171217 python3.6 安装 pip install 提示需要 permission deny怎么办?

用--user 在python3.6 -m pip install flask 后面

即 python3.6 -m pip install flask --user


nstall and use pip in a local directory without root/sudo access.

By:@saurabhshri

Why?

Many users when are given server access, do not have root (or sudo)

privileges and can not simply do sudo apt-get install python-pip .

Here's an easy way you can install and use pip without root (or sudo)

access in a local directory. Note : This works without easy_install too.

How?

Download pip from an online repository : wgethttps://bootstrap.pypa.io/get-pip.py

Install the downloaded package into a local directory : python get-pip.py --user This will install pip to your local directory (.local/bin).

Now you may navigate to this directory (cd .local/bin) and then use pip or better set your $PATH variable this directory to use pip anywhere :PATH=$PATH:~/.local/binfollowed bysource ~/.bashrcto apply the changes.

And that's it. You may now install all python modules you require via pip in a local directory without root.

Gist of Gist

wget https://bootstrap.pypa.io/get-pip.py && python get-pip.py --user

cd .local/bin

./pip install --user


20171217 python3.6 安装 pip install 提示需要 permission deny怎么办?_第1张图片

你可能感兴趣的:(20171217 python3.6 安装 pip install 提示需要 permission deny怎么办?)