Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sudo apt install python3-netatmo-api-python WANTED #83

Closed
clemefr opened this issue Jul 19, 2024 · 2 comments
Closed

sudo apt install python3-netatmo-api-python WANTED #83

clemefr opened this issue Jul 19, 2024 · 2 comments

Comments

@clemefr
Copy link

clemefr commented Jul 19, 2024

We need to install globally netatmo-api-python

netatmo-api-python is available from https://pypi.org/ (with sudo pip3 install)

The reason why the pip install command doesn’t work in Ubuntu >23.04 is down to an intentional shift in policy (also taken in Ubuntu’s upstream, Debian) to avoid conflicts between the Python package manager and Ubuntu’s underlying APT.
Basically, you can’t run pip install outside a virtual environment in Ubuntu 23.04. If you try to, you get a “externally managed environment” error

As many have already did (python3-flask-sqlalchemy, python3-flask-mail, etc.. ), python3-netatmo-api-python is still missing for installation with sudo apt install

@rvk01
Copy link

rvk01 commented Jul 19, 2024

The reason why the pip install command doesn’t work in Ubuntu >23.04 is down to an intentional shift in policy (also taken in Ubuntu’s upstream, Debian) to avoid conflicts between the Python package manager and Ubuntu’s underlying APT. Basically, you can’t run pip install outside a virtual environment in Ubuntu 23.04. If you try to, you get a “externally managed environment” error

Isn't the solution to this not just removing one file. This is a well known solution to the problem.

sudo mv /usr/lib/python3.11/EXTERNALLY-MANAGED /usr/lib/python3.11/EXTERNALLY-MANAGED.old

There are other solutions to, like using pipx and some other solutions which you can find on the internet searching for that error.

@philippelt
Copy link
Owner

Hello @clemefr, I understand that you really WANT this feature, unfortunately I don't expect to invest time in apt package creation.

As @rvk01 already suggest, there are many alternatives to live with pip even without venv. If you don't like the above solution, you can also do a pip install --break-system-packages <package> to install using pip and it will not break anything.

I don't like the choice of Ubuntu. Most modern language come with its own package manager and a very rich online library that this manager give access. Trying to replicate that on other package management systems is probably plannig failure as you will never have all packages ported to apt or yum or apk or ..

I can understand that this makes sense for some python libraries that depends on non python binaries (like for example pillow that would require libjpeg) but I would by far prefer to be able to list external dependencies for a given python package to decide my self the tool to use to install them (apt, yum, apk, ...).

By the way, fell free to create the package if you want to and provide it to the community ! You are very welcome.

Phil

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants