pip upgrade OSError: [Errno:13] Permission Denied

后端 未结 1 638
名媛妹妹
名媛妹妹 2021-01-17 05:10

I need to upgrade pip on my Ubuntu system but I am getting error:

Collecting pip
  Using cached pip-9.0.1-py2.py3-none-any.whl
Installing collected packages:         


        
1条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-17 05:28

    Since you want to upgrade your system-wide Python, you need to run this command with administrator privilege:

    sudo pip install -U pip
    

    But, I recommend you not changing/polluting your system-wide Python. Instead use a virtualenv:

    virtualenv myapp
    source myapp/bin/activate
    pip install -U pip  # <- only if virtualenv is not up to date
    

    0 讨论(0)
提交回复
热议问题