Reinstall python 2.7.12 and python 3.5.2

后端 未结 1 778
盖世英雄少女心
盖世英雄少女心 2021-01-03 10:39

Good evening,

today i messed up my laptop trying to install some packages for python 3.5.2. I tried to install the correct pip version but i missed something and now

1条回答
  •  执笔经年
    2021-01-03 11:19

    I'd highly recommend using virtualenv, and never modifying the system python, except to install pip and virtualenv if necessary.

    As was alluded to above, many OSes count on having a working python2 in order to function.

    So...

    apt-get remove python3
    apt-get install python3
    pip3 install virtualenv
    virtualenv -p python3 venv
    . venv/bin/activate
    # now you are in a nice python3 world, completely isolated from system python
    # remember to say . venv/bin/python every time you do anything
    # or you can even add it to your .bashrc
    

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