You are not logged in.

#1 2024-04-28 17:55:13

giorez
Member
Registered: 2024-04-17
Posts: 4

[SOLVED] Python virtual enviroment error

I just migrated from debian to archlinux, and I can't use the python virtual enviroment to flash an image on a sd card:

Debian distro

sudo apt install python3-venv
python3 -m venv ~/ox64_venv
. ~/ox64_venv/bin/activate
pip install bflb-iot-tool

Archlinux distro
According https://wiki.archlinux.org/title/Python … nvironment I installed:

sudo pacman -S python
python -m venv ~/ox64_venv
. ~/ox64_venv/bin/activate
pip install bflb-iot-tool

Unfortunatelly when I try to flash, I get errors:
ModuleNotFoundError: No module named 'bflb_path'
ModuleNotFoundError: No module named 'pkg_resources'

I tryed to use pip to install missing modules, but they can't be found.

Any help is appreciated. Thanks.

Last edited by giorez (2024-04-29 10:47:54)

Offline

#2 2024-04-28 19:14:46

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,636

Re: [SOLVED] Python virtual enviroment error

pkg_resources is python-setuptools. That might let it load the other one, too.

Online

#3 2024-04-28 22:27:30

giorez
Member
Registered: 2024-04-17
Posts: 4

Re: [SOLVED] Python virtual enviroment error

I tryed this

sudo pacman -S python
sudo pacman -S python-setuptools
python -m venv ~/ox64_venv
. ~/ox64_venv/bin/activate
pip install python-setuptools

but error is still there.

Last edited by giorez (2024-04-28 22:28:13)

Offline

#4 2024-04-28 22:59:03

loqs
Member
Registered: 2014-03-06
Posts: 17,560

Re: [SOLVED] Python virtual enviroment error

pip install python-setuptools

What output did that produce in the venv?  Also in the venv what is the output of `pip list`?

Offline

#5 2024-04-29 05:05:48

giorez
Member
Registered: 2024-04-17
Posts: 4

Re: [SOLVED] Python virtual enviroment error

(ox64_venv) [gio@aimec ~]$ pip install python-setuptools
ERROR: Could not find a version that satisfies the requirement python-setuptools (from versions: none)
ERROR: No matching distribution found for python-setuptools

(ox64_venv) [gio@aimec ~]$ pip list
Package          Version
---------------- -------
bflb_crypto_plus 1.0
bflb-iot-tool    1.8.7
ecdsa            0.19.0
future           1.0.0
pip              24.0
portalocker      2.0.0
psutil           5.9.8
pycklink         0.1.1
pycryptodome     3.9.8
pylink-square    0.5.0
pyserial         3.5
six              1.16.0


PS this solved the issue:
(ox64_venv) [gio@aimec ~]$ pip install setuptools

Last edited by giorez (2024-04-29 05:15:42)

Offline

#6 2024-04-29 06:46:38

seth
Member
Registered: 2012-09-03
Posts: 52,199

Re: [SOLVED] Python virtual enviroment error

Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

#7 2024-04-29 10:26:28

giorez
Member
Registered: 2024-04-17
Posts: 4

Re: [SOLVED] Python virtual enviroment error

sorry, you are right, I just didn't find the button to mark this post as solved.

Offline

Board footer

Powered by FluxBB