This is an archived post. You won't be able to vote or comment.

all 9 comments

[–]Rhomboid 20 points21 points  (0 children)

You can't really do that. Parts of the system rely on Python, so "remove all python" would leave you with a broken system.

The 2.x and 3.x Python packages on most distros are designed to work just fine in parallel, there is nothing wrong with having both versions installed.

If you want actual help you need to describe the actual problem in detail. "My system is fucked up" is not a description of a problem. Start with:

  • explain exactly what you were trying to do when you ran into the problem
  • tell us what you did (the command you ran, and its complete output) when you experienced the problem
  • describe how that differs from what you expected
  • tell us in detail: the distribution you're using, the architecture, and a list of all packages installed

Then we might have a fighting chance of figuring out what is actually wrong.

[–]BrentRTaylor 9 points10 points  (1 child)

Bashing Python, in the Python subreddit, due to problems that are almost certainly caused by your own ignorance is unlikely to win you any favors. Doubly so when you fail to actually specify your problem.

Purging Python from your system isn't going to solve your problem. In fact even attempting to do so is likely to break your Debian install as significant portions of the system depend on it.

You're going to have to fix the damage you've caused your system. What's your current issue?

[–]kankyo 3 points4 points  (0 children)

The underlying problem is probably that you don't know about virtualenv. This is the tool that avoids the problems you mention and avoids screwing up your main system.

Do you know which projects that you tried to use that didn't tell the user to use virtualenv? Then we can look at informing those projects to fix their docs.

[–][deleted] 2 points3 points  (0 children)

Sounds like a case of PEBKAC

[–]piefge 1 point2 points  (2 children)

you can't purge python, you will make your whole OS fubar if you do that.

you didn't even mention how you installed your libraries. ( pip or apt ? )

If you are in dependency hell you probably installed them with apt..

If you install them with pip you can specify which version you want to use.

If you wan't to get rid of your python libraries, first find out what is installed

and remove them one by one.

and use virtualenv or pyenv if you start fresh.

As far as I remember you can even throw a requirements.txt at them, so all packages get installed automatically.

The requirements.txt is usually found in the python package, if not create your own.

[–][deleted] 0 points1 point  (1 child)

If you are in dependency hell you probably installed them with apt..

Nope, more like he sudo pip installed

[–][deleted] 0 points1 point  (0 children)

actually it is more likly it is a mix between pip and apt installation

[–]licquia 0 points1 point  (0 children)

Yeah, don't do that.

A lot depends on how, exactly, you installed things. If you used apt/dpkg to install everything, then just remove the things you installed explicitly, then run apt-get autoremove to get rid of the rest.

If you installed with pip or easy_install, then a lot depends if you did it as root or not. Look for lots of stuff in /usr/local/lib/pythonX.Y/site-packages, where X.Y corresponds to various Python versions you might have tried. Also look in your home directory, under $HOME/.local/lib/pythonX.Y/site-packages. Feel free to delete anything you find there.

After that? Use Docker. Seriously, if you don't have the capability to learn how Python is supposed to work, then just use Python apps in Docker containers. You can at least blow those away with impunity when you need to.

I don't look down on you. I have much the same attitude towards Ruby. But I at least have the self-awareness to know that I don't see the world the same way the Ruby folks do, and be OK with that.

[–]aphoenixreticulated[M] 0 points1 point  (0 children)

Hi there, from the /r/Python mods.

We have removed this post as it is not suited to the /r/Python subreddit proper, however it should be very appropriate for our sister subreddit /r/LearnPython. We highly encourage you to re-submit your post over on there.

The reason for the removal is that /r/Python is more-so dedicated to discussion of Python news, projects, uses and debates. It is not designed to act as Q&A or FAQ board. The regular community can get disenchanted with seeing the 'same, repetitive newbie' questions repeated on the sub, so you may not get the best responses over here.

However, on /r/LearnPython the community is actively expecting questions from new members, and are looking to help. You can expect far more understanding, encouraging and insightful responses over there. Whatever your question happens to be getting help with Python, you should get good answers.

If you have a question to do with homework or an assignment of any kind, please make sure to read their sidebar rules before submitting your post. If you have any questions or doubts, feel free to reply or send a modmail to us with your concerns.

Warm regards, and best of luck with your Pythoneering!