You are not logged in.

#1 2025-03-14 11:45:14

rtarchuser
Member
Registered: 2022-01-30
Posts: 13

python-str2bool

Could this be added (or returned) to Arch?

I'm trying to run a Django template, and I get (error.log):

[Fri Mar 14 10:56:29.375089 2025] [wsgi:error] [pid 24900:tid 24900] [client ::1:52032]   File "/home/<username/Programs/Django/django_material_kit/core/settings.py", line 16, in <module>, referer: http://localhost/django_material_kit
[Fri Mar 14 10:56:29.375091 2025] [wsgi:error] [pid 24900:tid 24900] [client ::1:52032]     from str2bool import str2bool, referer: http://localhost/django_material_kit
[Fri Mar 14 10:56:29.375103 2025] [wsgi:error] [pid 24900:tid 24900] [client ::1:52032] ModuleNotFoundError: No module named 'str2bool', referer: http://localhost/django_material_kit

I thought I had it installed at one time in the virtual environment using:

pip3 install git+git://github.com/kmonsoor/str2bool.git

and I've still got the str2bool folder and its contents in .../env/lib/python3.13/site-packages.

Now all of:

(env) [<uisername>@<computername> django_material_kit]$ pip3 uninstall str2bool
(env) [<uisername>@<computername> django_material_kit]$ pip3 install git+git://github.com/kmonsoor/str2bool.git
(env) [<uisername>@<computername> django_material_kit]$ pip3 install str2bool

give

error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try 'pacman -S
    python-xyz', where xyz is the package you are trying to
    install.

etc, etc

Offline

#2 2025-03-14 13:54:38

mithrial
Member
Registered: 2017-03-05
Posts: 140

Re: python-str2bool

Inside the env, the correct pip command might just be pip (intead of pip3.)

Offline

#3 2025-03-14 20:52:27

rtarchuser
Member
Registered: 2022-01-30
Posts: 13

Re: python-str2bool

Yes, I used that first.

I've installed the module manually now, and it's not complaining about it any mire, the site runs on the Django server and "python manage.py check" says no issues.
The site also runs on PythonAnywhere (and did without chasing around for modules. With my Apache though, I'm getting "Page not found", so presumably it's not finding the urls, but I've yet to find any useful log files.

Offline

Board footer

Powered by FluxBB