You are not logged in.

#1 2024-07-30 14:22:58

AbubakrSul
Member
Registered: 2024-07-30
Posts: 6

Help with installing Python packages!

I want to install python packages without a virtual environment but always get this error: error: externally-managed-environment. I have tried downgrading my pip but then encounter the error module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'? Is there a way I can downgrade my Python to fix these issues without breaking all of my packages?

INFO:
Python version: 3.12.4
Pip version: pip 24.1.2 from /usr/lib/python3.12/site-packages/pip (python 3.12)
Desktop environment: KDE Plasma (I don't know if this will help)
AUR Packages: Brave, VSCode
AUR Helper: Yay

Thank you for your help,
Abubakr

Offline

#2 2024-07-30 14:36:06

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

Re: Help with installing Python packages!

What are your trying to install?  I'd wager they are in the AUR if not in Extra.  If not, you have two choices; use a virtual environment or create your own PKGBUILD script to install it.  Bonus points if you publish it in the AUR.   The scripts for most python packages are trivial.  And, they avoid breakage if those packages ever do become part of extra.


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

#3 2024-07-30 14:38:16

AbubakrSul
Member
Registered: 2024-07-30
Posts: 6

Re: Help with installing Python packages!

I'm currently trying to install wsgi in Flask. I'm pretty sure you can install it via pacman like I did with the other packages but it needs to install the entire script which I can't do.

Offline

#4 2024-07-30 15:02:53

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

Re: Help with installing Python packages!

Then the Arch Linux approach would be be take the PKGBUILD for that package and tailor it to meet your needs.  Or, use a venv.   Tangentially, I like Poetry for that purpose.


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

#5 2024-07-30 15:04:15

AbubakrSul
Member
Registered: 2024-07-30
Posts: 6

Re: Help with installing Python packages!

I'll try using a virtual environment and I'll give you the output.

Offline

#6 2024-07-30 15:07:33

AbubakrSul
Member
Registered: 2024-07-30
Posts: 6

Re: Help with installing Python packages!

Everything works in a virtual environment! Thanks for the help.

Offline

#7 2024-07-30 15:08:39

AbubakrSul
Member
Registered: 2024-07-30
Posts: 6

Re: Help with installing Python packages!

How do I put this as solved (sorry I'm new to the forms usually I just use the wiki) (You can also put this as solved if possible)

Offline

#8 2024-07-30 15:20:21

Nikolai5
Member
From: North West, England, UK
Registered: 2024-01-27
Posts: 274

Re: Help with installing Python packages!

You just edit your first post and change the title. There is a character limit so you might need to shave a bit off to fit [solved] in.


Ryzen 7 9850X3D | AMD 7800XT | KDE Plasma

Offline

Board footer

Powered by FluxBB