Reputation: 159
The past years I have needed python occasionally, but I have been installing versions and packages blindly using all sorts of different methods (canopy, easy_install, pip,...). This has led to the following tragic result:
$ python
python python2.7-config python3.4-32 pythonw2.6
python-config python3 python3.4-config pythonw2.7
python2.6 python3-32 python3.4m
python2.6-config python3-config python3.4m-config
python2.7 python3.4 pythonw
Currently I want to start a new project, using a lot of different python modules. However, when installing packages like pandas (using pip
) I am running into difficulties which are most likely caused by the sheer number of python installations on my machine.
My question now is how could I remove all these python installations and start afresh, without doing a complete OS re-installation as suggested here. I know this is possibly the best solution, but due to other projects I am currently working on this is currently not an option for me.
Alternatively, how could I at least create a workable python environment in which I can install the modules I need for the version I am using.
All help is greatly appreciated!
Louis
Upvotes: 6
Views: 7636
Reputation: 3719
Let's assume you want to remove version 2.6. You can do
which python2.6
this will return the location of python2.6 in your computer. Then you can remove it.
Keep in mind that Python 2.x is shipped with OS X, so I don't think that removing it totally is a good option.
I have never tried virtualenv
but this might be useful : Comprehensive beginner's virtualenv tutorial?
Upvotes: 4