ct-Open-Source / ct-Open-Source/tuya-convert

error: This environment is externally managed

Open
#1,159 8 comments 2 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
5.1k
Forks
523
PR merge metrics
No merged PRs in 30d

Description

I've followed the instructions, and when running the `install_prereq.sh` , but once it has finished installing the `apt-get` packages, it has an error as below.

error: externally-managed-environment

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

I've copied the line out of the `.sh` file, and edited it from

`sudo python3 -m pip install --user --upgrade paho-mqtt tornado git+https://github.com/drbild/sslpsk.git pycryptodomex`

to

`python3 -m pip install --break-system-packages --user --upgrade paho-mqtt tornado git+https://github.com/drbild/sslpsk.git pycryptodomex`

(i.e. removed `sudo` and added `--break-system-packages`)

This seems to install all of the Python packages correctly, but can the developers confirm that this is correct please??

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with install_prereq.sh, especially the apt-get section and the Python pip command that installs paho-mqtt, tornado, sslpsk, and pycryptodomex. Reproduce the externally-managed-environment error on the reported setup and verify the supported installation approach; done means the prerequisite script installs these packages successfully without requiring an unconfirmed manual workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.