May-16-2017, 01:13 PM
(This post was last modified: May-16-2017, 01:28 PM by sparkz_alot.)
There is a different site-packages directory for each version of Python that you have. If you do
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
pip3 install pyperclip
it will only install it in the site-packages for version aliased as python3. If you use pip3.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
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition