简体   繁体   中英

How to use pip3 install packages for Python 3.5 in ubuntu 14.04 server

Ubuntu 14.14 server itself has installed Python 3.4 in default, however, I need to use Python 3.5 for certain packages. So I install it by myself.

The problem is that every time I try to install packages by running "pip3 install xxx". It always installs under Python 3.4 rather than 3.5.

Please show me some lights on how to use Python 3.5 properly on Ubuntu. Many thanks for any good suggestions!

To install it to the right version of python, type:

sudo python3 -m pip install [package]

Now this is assuming the name of Python 3.5 is python3 . If this is not the case,

  1. Create an alias of Python 3.5 to some name
  2. Replace python3 in the snippent above with that name .
  3. Execute the command.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM