I think that the suggestions offered so far (environments, etc.) are all very good, but another approach is to use the Anaconda distribution of Python:

https://www.anaconda.com/

I use this distribution precisely to avoid any mixups with the Python files that come with the OS distribution.  Note that the use of the Anaconda version of Python doesn't preclude the use of pip, Python environments, etc.


On Mon, Sep 4, 2023 at 10:25 PM Javier Perez <pepebuho@gmail.com> wrote:
Thanks.
I used plain pip, no sudo stuff.
Time to hunt the . directories.
Thanks!

On Mon, Sep 4, 2023 at 11:08 AM Jonathan Billings <billings@negate.org> wrote:
On Sep 4, 2023, at 11:35, Javier Perez <pepebuho@gmail.com> wrote:
> I installed Pycharm to learn python, installed some libraries using pip, totally sure I must have screwed up something although I have not felt the effect yet.
>
> My question is, how can I go back to default without reinstalling my whole linux setup from scratch? This is also my personal computer and I am sure there are customizations even I forgot I set up in general. It would be kind of a pain.
> I know I cannot delete totally Python because linux uses it heavily nowadays.
>
> My goal is to delete whatever was installed through pip and stick to packages from the repositories and reinstall a programming environment in a reasoned, less haphazzard/ad hoc way.

Did you use ‘sudo pip install …’ or just pip as your regular user?  Because if you just used your regular user, it’s most likely sitting in a directory in ~/.local/lib/python3.*  and you can just delete everything in there and not affect the OS packages.

If you used sudo, most likely it’s all in /usr/local/lib/python3.* and /usr/local/share/python3.* but it might be worth running ‘rpm -Va python*’ and reinstall any packages that fail checksum verification.

If you want to play with pip I really suggest leaning to love Python virtual environments (the venv module) since they are really good for containing everything in a directory.  If you must use sudo pip, check out podman container toolbox to keep it from breaking your OS.  Container toolboxes might not work with your IDE though, I tend to use emacs so I’ve never had a problem.

--
Jonathan Billings
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-leave@lists.fedoraproject.org
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue


--
------------------------------
 /\_/\  
 |O O|  pepebuho@gmail.com
 ~~~~     Javier Perez
 ~~~~          While the night runs
 ~~~~          toward the day...
  m m       Pepebuho watches
                from his high perch.
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-leave@lists.fedoraproject.org
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue