Whilst using Pycharm on a python3 project, I came across the option under the "Project Interpreter" settings to install a package manager. I clicked it absentmindedly and immediately realized that I had wrought a horror upon myself.
I'm assuming that the option I clicked was to install PIP for python3, because from my terminal I was unable to use PIP correctly. Doing anything with the pip command results with this output:
$ pip install lxml Traceback (most recent call last): File "/usr/local/bin/pip", line 9, in <module> load_entry_point('pip==1.5.6', 'console_scripts', 'pip')() File "/usr/local/lib/python3.4/dist-packages/setuptools-5.7-py3.4.egg/pkg_resources.py", line 356, in load_entry_point File "/usr/local/lib/python3.4/dist-packages/setuptools-5.7-py3.4.egg/pkg_resources.py", line 2472, in load_entry_point try: File "/usr/local/lib/python3.4/dist-packages/setuptools-5.7-py3.4.egg/pkg_resources.py", line 2186, in load self.py_version = py_version ImportError: No module named 'pip'
I thought PIP was missing, so I tried to remove and re-add the ubuntu package
python-pip, I attempted to run
python get-pip.py but that reported that PIP was already installed.
After a while, I found that PIP was still installed for python27, but not for python34. (From my understanding) This is what /should/ be expected to prevent the exact issues I'm having now, however, whatever Pycharm did seems to have changed the default behavior in my terminal to look for PIP in python34, despite the fact that my default python is still python27 (verified by running
I reinstalled PIP for python34 which has given me the ability to install packages again, but I do not want this behavior.
How do I reset everything so I can safely uninstall PIP for python34 and revert the default PIP to be the python27 version?
(After I've cleaned everything up, I'll start working with
virtualenv. I was only made of its existence today while attempting to troubleshoot this issue.)