You are not logged in.

#1 2024-02-25 16:47:56

jojo06
Member
Registered: 2023-11-04
Posts: 366

[SOLVED]Python and Arch

I hope I'm writing in the right place. Geek for Geeks is all about.

Why can't Arch use `pip install` ? I've seen python give many warnings etc. when installing with Yay. I've heard that using `pip install` breaks Arch and I've never used it and we never use it. So what is the reason, why python in particular? Also Arch (from what I see and perceive) is much improved and more robust / better than a few years ago.

Will there be a fix in Python, etc. It is very nice that Python is simple and highly usable. When I write code, I rarely ask my friends to run the code when I need it. Perl, js etc. Is there a similar language like Python that you can recommend?

Last edited by jojo06 (2024-02-26 14:00:20)

Offline

#2 2024-02-25 17:20:47

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: [SOLVED]Python and Arch

jojo06 wrote:

why python in particular?

This prohibition isn't for python in particular.  You really should avoid all third-party package managers.  Pacman is your package manager, and careless use of any other package managers on the same system will cause problems.  Careless use of pip for python, gem for ruby, tlmgr for latex, ppm for perl, or any number of countless others would be problematic.

jojo06 wrote:

Will there be a fix in Python

Fix for what?  Nothing is broken (in python).

jojo06 wrote:

Is there a similar language like Python that you can recommend?

Similar in what way?  There are hundreds of programming / scripting languages.  Python, lua, ruby, perl, wren, php, and julia are a few random ones that come to mind.  What are you looking to do?


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2024-02-25 21:48:27

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,612

Re: [SOLVED]Python and Arch

jojo06 wrote:

I hope I'm writing in the right place. Geek for Geeks is all about.

Why can't Arch use `pip install` ?

It can; I do it all the time.  I seriously recommend that, if you do, you use it in virtual environments and on a user by user basis (don't install it globally)
https://wiki.archlinux.org/title/Python … nvironment

I happen to use poetry to manage virtual environments.   You may want to read
https://wiki.archlinux.org/title/Python … management
for your python package management options.

Also, read https://wiki.archlinux.org/title/Python … nvironment

Last edited by ewaller (2024-02-25 21:49:28)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#4 2024-02-25 22:29:57

jojo06
Member
Registered: 2023-11-04
Posts: 366

Re: [SOLVED]Python and Arch

@Trilby Isn't it the 3rd party software that ewaller are talking about? There is a special warning for `pip`, not any 3rd party software. It should never be used, never ever. Oops, I didn't know about gem, I installed 1-2 ruby packages with gem. By fix I mean, will pip become usable with an improvement? So what is being said is that `Arch is an unbreakable system smile but using pip breaks the system, that's the most direct way.

When i say Python-like language, python is very simple and you can write a lot of things. It's very easy to code and its libraries are very easy and very functional. It's straightforward, there are no syntax issues, no installations, no packages, etc. For example, in C, the packages that work on Linux and Windows are separate. In Go, the 2 main packages are problematic, and syntax is a pain. REAL pain. But as far as I understand other languages have `pip` and the situation is the same. Like you said; gem for ruby, tlmgr for latex, ppm for perl.

@ewaller This is very good news, from what I have read I understand that `python-pipenv` and/or `python-virtualenv` act as mirrors for pip/python. Just like yewtu.be, so it doesn't infect the operating system with the installed `pip` packages. Is it true? But I'm a bit scared to use it right now smile

Should I mark it as resolved ? Also, what kind of title and where should I open such topics ?

Last edited by jojo06 (2024-02-25 22:30:41)

Offline

#5 2024-02-25 22:40:59

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: [SOLVED]Python and Arch

jojo06 wrote:

@Trilby Isn't it the 3rd party software that ewaller are talking about?

Trilby wrote:

Careless use of pip for python, gem for ruby, tlmgr for latex, ppm for perl, or any number of countless others would be problematic.

Ewaller is not careless.  He knows what he is doing (most of the time, we cut him some slack as he is an engineer after all).

But I stand by the following statement as generally valid (generally meaning there are exceptions) as well as specifically for you:

Trilby wrote:

You really should avoid all third-party package managers.

jojo06 wrote:

There is a special warning for `pip`, not any 3rd party software. It should never be used, never ever.

I call BS.  Please point me to this warning that says one should "never ever" use pip.

jojo06 wrote:

So what is being said is that `Arch is an unbreakable system smile but using pip breaks the system

No, no one ever said anything of the sort.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#6 2024-02-25 23:03:05

andyturfer
Member
Registered: 2021-01-08
Posts: 106

Re: [SOLVED]Python and Arch

jojo06 wrote:

Why can't Arch use `pip install` ?

You've answered your own question! Linux still uses a lot of python, so when you "pip install" something globally, you run the risk of breaking your entire system.

Python's virtual environments are a much better way of doing things. Sure, a lot of folks find it frustrating and inconvenient transitioning, but it's definitely worth it.

Offline

#7 2024-02-26 14:00:04

jojo06
Member
Registered: 2023-11-04
Posts: 366

Re: [SOLVED]Python and Arch

@andyturfer

Linux still uses a lot of python, so when you "pip install" something globally, you run the risk of breaking your entire system.
Sure, a lot of folks find it frustrating and inconvenient transitioning, but it's definitely worth it.

Very informative and important, thank you

@Trilby

I see, so it can be used as long as you know what you're doing. But you and I both agree that I shouldn't be involved right now.
ewaller and you obviously know a lot, I thought it was the (safe and risk-free) way ewaller mentioned.

Offline

#8 2024-02-27 00:58:44

mountaintrek
Member
Registered: 2024-02-01
Posts: 60

Re: [SOLVED]Python and Arch

I think the answers above are clear that yes you can install using pip, just don't do it system wide or you'll mess up your system python libraries. pacman maintains meta data in /var/lib/pacman/local of all installed packages which includes files and their versions.  You can view a list of these files for example, by using `pacman -Ql python`.  Only pacman should manage those files.  This should be true for all languages.   Just a word of caution, be judicious in what and where you download and install.

Links that might be helpful:

- Python Virtual Environments: A Primer

- venv — Creation of virtual environments

- PEP 668 – Marking Python base environments as “externally managed” (historical info)

Offline

Board footer

Powered by FluxBB