I'm trying to Install PIP for python 3.6 and I've looked over YouTube for tutorials but all of them seem to be out of date and none of them have seemed to work. Any information would be helpful so I can carry on with my project.
13 Answers
How did you install Python, and are you using a virtual environment?
As you specifically mentioned Python 3.6, and you have not marked this as answered I will make a guess that you might have installed it using sudo add-apt-repository ppa:jonathonf/python-3.6, as this is a common way to install Python 3.6 on a Unix OS that doesn't have a native 3.6 package. If this is the case the correct way to install pip is as follows ....
Step 1) Make a Virtual Environment with Python 3.6 ...
python3.6 -m venv env --without-pip
Step 2) Activate your virtual environemnt ...
source env/bin/activate
Step 3) Install pip into your environemnt ...
curl https://bootstrap.pypa.io/get-pip.py | python3
I have in this moment install the bs4 with python 3.6.3 on Windows.
C:\yourfolderx\yourfoldery>python.exe -m pip install bs4
with the syntax like the user post below:
I just successfully installed a package for excel. After installing the python 3.6, you have to download the desired package, then install. For eg,
python.exe -m pip download openpyxl==2.1.4
python.exe -m pip install openpyxl==2.1.4
There are situations when your pip doesn't get downloaded along with python installation. Even your whole script folder can be empty.
You can do so manually as well.
Just head to Command Prompt and type python -m ensurepip --default-pip Press Enter.
Make sure that value of path variable is updated.
This will do the Trick
This what worked for me on Amazon Linux
sudo yum list | grep python3
sudo yum install python36.x86_64 python36-tools.x86_64
$ python3 --version Python 3.6.8
$ pip -V pip 9.0.3 from /usr/lib/python2.7/dist-packages (python 2.7)
]$ sudo python3.6 -m pip install --upgrade pip Collecting pip Downloading https://files.pythonhosted.org/packages/d8/f3/413bab4ff08e1fc4828dfc59996d721917df8e8583ea85385d51125dceff/pip-19.0.3-py2.py3-none-any.whl (1.4MB) 100% |████████████████████████████████| 1.4MB 969kB/s Installing collected packages: pip Found existing installation: pip 9.0.3 Uninstalling pip-9.0.3: Successfully uninstalled pip-9.0.3 Successfully installed pip-19.0.3
$ pip -V pip 19.0.3 from /usr/local/lib/python3.6/site-packages/pip (python 3.6)
Yes, Python3.6 installs PIP but it is unreachable as it is installed. There is no code which will invoke it as it is! I have been at it for more than a week and I read every single advice given, without success!
Finally, I tested going to the pip directory and upgrading the installed version:
root@bx:/usr/local/lib/python3.6/site-packages # python -m pip install --upgrade pip
That command created a PIP which now works properly from any location on my FreeBSD server!
Clearly, the tools installed simply do not work, as installed with Python3.6. The only way to run them is to invoke Python and the desired python files as you can see in the command issued. Once the update is called, however, the new PIP works globally without having to invoke Python3.6...
pipshould be bundled with 3.6. Check thebindirectory in your distribution, alternatively trypip3. - cdarke