You are not logged in.
Trying to install python modules i.e.
pip3 install requests
Getting the following error:
Traceback (most recent call last):
File "/usr/bin/pip3", line 9, in <module>
load_entry_point('pip==7.1.0', 'console_scripts', 'pip3')()
File "/usr/lib/python3.5/site-packages/setuptools-18.1-py3.5.egg/pkg_resources/__init__.py", line 558, in load_entry_point
File "/usr/lib/python3.5/site-packages/setuptools-18.1-py3.5.egg/pkg_resources/__init__.py", line 2682, in load_entry_point
File "/usr/lib/python3.5/site-packages/setuptools-18.1-py3.5.egg/pkg_resources/__init__.py", line 2355, in load
File "/usr/lib/python3.5/site-packages/setuptools-18.1-py3.5.egg/pkg_resources/__init__.py", line 2361, in resolve
ImportError: No module named 'pip'
So I tried
which pip
which returns
/usr/bin/pip
Checked to make sure /usr/bin is in my path, and it is.
Ran
sudo easy_install pip
and got what looks like success
Searching for pip
Best match: pip 7.1.0
Processing pip-7.1.0-py3.5.egg
pip 7.1.0 is already the active version in easy-install.pth
Installing pip script to /usr/bin
Installing pip3.5 script to /usr/bin
Installing pip3 script to /usr/bin
Using /usr/lib/python3.5/site-packages/pip-7.1.0-py3.5.egg
Processing dependencies for pip
Finished processing dependencies for pip
Very confused.
Last edited by chiiidog (2016-06-06 22:25:55)
Offline
How did you install pip? Given what you have posted and your post count, it seems that you are new to Arch so I suspect that you are not used to using Pacman and have installed things manually. This will lead to system clutter, unsatisfied dependencies, etc.
The Arch way is to create Pacman packages. Most of the time these likely exist already either in the official repos or the AUR. I recommend that you read the wiki entries for makepkg and PKGBUILDs. It is very simple to package Python modules for Pacman.
The Python 3.x pip module is in the package python-pip. The one for Python 2.x is in python2-pip.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
Not a direct answer to your question, but...
A more Archey way of doing this would be to install python-requests from the AUR. Let pacman manage your packages.
Edit: $DEITY I am slow today.
Last edited by ewaller (2016-06-06 22:16:42)
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
Thanks. I actually just solved my problem by using curl to download get-pip from the python website. This upgraded my pip version and then I used sudo pip3 install requests. I guess I should definitely learn to do it the Arch way though. Seems a lot less painful once you get the hang of it. I've installed a couple things from the AUR at this point but it was on a bad wifi connection and it took forever. Now I'm wired up though which should make things easier.
Offline
You really should "always" use your package management system to handle packages. If a package does not exist, which is rare here, it's fast and easy to create one. This is one of the greatest things about Arch in general. Why you should always use a package management system
Last edited by TheChickenMan (2016-06-06 23:09:46)
If quantum mechanics hasn't profoundly shocked you, you haven't understood it yet.
Niels Bohr
Offline
OP, you should not be installing python packages into your global environment as you are very likely to break things. That is why python does not install pip into any global namespace. You should be using a virtual environment for your application. When you create the virtual environment then python automatically installs pip into that environment. E.g using stock python on Arch:
python -m venv env
env/bin/pip install requests
Offline
I think we have sent the message
Last edited by ewaller (2016-06-07 03:23:38)
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
OP, you should not be installing python packages into your global environment as you are very likely to break things. That is why python does not install pip into any global namespace. You should be using a virtual environment for your application. When you create the virtual environment then python automatically installs pip into that environment. E.g using stock python on Arch:
python -m venv env env/bin/pip install requests
Yeah Im used to OS X where everythings more separated and idiot proof. I ended up setting up a virtual environment.
Last edited by chiiidog (2016-06-07 12:29:45)
Offline