May-25-2017, 05:44 AM
Thanks for your valuable reply,
pip3.6 install modules
throws pip3.6: command not found error.
Also all my python distribution saved in same directory..
mohan@mohn ~ $ which python
/usr/bin/python
mohan@mohn ~ $ which python3
/usr/bin/python3
mohan@mohn ~ $ which python3.6
/usr/bin/python3.6
pip3.6 install modules
throws pip3.6: command not found error.
Also all my python distribution saved in same directory..
mohan@mohn ~ $ which python
/usr/bin/python
mohan@mohn ~ $ which python3
/usr/bin/python3
mohan@mohn ~ $ which python3.6
/usr/bin/python3.6
(May-16-2017, 01:13 PM)sparkz_alot Wrote: There is a different site-packages directory for each version of Python that you have. If you dopip3 install pyperclip
it will only install it in the site-packages for version aliased as python3. If you usepip3.6 install pyperclip
, it will install in site-packages for v3.6. This also applies with removing, upgrading and listing modules for the various versions.
I don't have the Linux machine running, but it's possible that "pip" and "pip3" will work with both Python 2 and Python 3.
EDIT:
If you are on a Linux machine I would highly recommend you not mess with the defaults, as Linux, especially the desktop environments use a great deal of Python code. Also, when you install a new version (as in 3.6.1) it is usually in a directory different from the two default versions (usually the"/opt" directory). Another thing to keep in mind, is the "shebang line", with the default versions, it is usually#! /usr/bin/env python
or#! /usr/bin/env python3
, with self installed versions, that may change to something like#! /usr/local/bin/python3.6