pip is a package management system used to install and manage software packages written in Python.You can find many third party packages on Python Package Index(PyPI). There are currently 94060 packages here.You can browse all of the packages at the following link
So to use pip for Python 3 alongside Python 2, Follow this steps:
Step 1:
First of all, you have to install both python versions.If you haven't installed it already you can see my other post how to install python 2 and python 3 on Windows PC.
Make sure to check Add python 3.5 to path while installing Python 3.
Make sure to check Add python 3.5 to path while installing Python 3.
Step 2:
After installation, you have to setup your path for pip (for Python 2) in your windows PC. To do that first of all copy the following path
C:\Python27\Scripts
Make sure this path matches your Windows' Python 2 path.So please crosscheck before applying this.Otherwise, this method won't work.
Step 3:
- Go to Control Panel\System and Security\System
- Go to Advanced System Settings,
- Click on Environment Variables
- Double click on Path
- Click on New
- Add the path of which is provided in Step 2.
Congratulations! Now you can use pip for both versions of python separately:
To use pip for Python 2 just type pip2 in command prompt
To use pip for Python 3 just type pip3 in command prompt
So if you use pip3, pip will install all the packages only for Python 3. It will have not any effect on Python 2. So as you expect, pip2 will only install for Python 2.
Hope this helps :)
Comments
Post a Comment