Upgrading python3.4 to python3.6 on ubuntu breaks pip

前端 未结 9 958
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-08 06:56

I\'m attempting to install python3.6 on my machine after I currently have python3.4. However, after installation trying to run pip under python3.6 gives me the

相关标签:
9条回答
  • 2020-12-08 07:28

    I finally got around this by running:

    curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
    python3.6 get-pip.py --force-reinstall
    

    After this I can install python3.6 specific packages with:

    python3.6 -m pip install <packagename>
    
    0 讨论(0)
  • 2020-12-08 07:34

    You can solve this error by using this command. it will update your setuptools

    python -m ensurepip --upgrade
    
    0 讨论(0)
  • 2020-12-08 07:35

    I could not solve it by running

    python3 get-pip.py
    

    or

    pip3 install --upgrade
    

    because there I already had issues with pkg_resources.py. Also re-installing the python3-setuptools package from Ubuntu did not help as this still seems to install the one for the version originally installed with the Ubuntu system (3.4 in my case) but I could solve it by manually installing the setuptools via

    wget https://bootstrap.pypa.io/ez_setup.py -O - | python3
    

    Note: python3 points to my new python version 3.6. If thats not the case for you then you would need to run

    wget https://bootstrap.pypa.io/ez_setup.py -O - | python3.6
    
    0 讨论(0)
提交回复
热议问题