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

Ubuntu 24.04 + Odoo 17.0 - error: externally-managed-environment #425

Open
horatiua opened this issue Jun 26, 2024 · 5 comments
Open

Ubuntu 24.04 + Odoo 17.0 - error: externally-managed-environment #425

horatiua opened this issue Jun 26, 2024 · 5 comments

Comments

@horatiua
Copy link

horatiua commented Jun 26, 2024

Hi,

I use Digital Ocean with an Ubuntu 24.04 (LTS) x64 droplet.
While installing the following error appears.
If I disable the externally-managed-environment I get another error regarding idna 3.6 (see second error below)
Any idea on how to solve this? 
Thank you! 

---- Install python packages/requirements ----
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.

If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.

If you wish to install a non-Debian packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.

See /usr/share/doc/python3.12/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.

idna error

Installing collected packages: idna, greenlet, geoip2, ebaysdk, docutils, decorator, chardet, beautifulsoup4, Babel, zeep, vobject, reportlab, ofxparse, gevent, freezegun, cryptography, pyopenssl
Attempting uninstall: idna
Found existing installation: idna 3.6
ERROR: Cannot uninstall idna 3.6, RECORD file not found. Hint: The package was installed by debian.

Screenshot 2024-06-26 at 16 57 46
@niamulhasan
Copy link

Facing the same problem

@icf20
Copy link

icf20 commented Jul 16, 2024

afaik u need to keep separated the system stuff and odoo stuff

afaik u need to

1 with root ssh, su odoo-user-from-install
2 pip3 install xxxyyyzzz --user

that way u install stuff only for the user, u can check later with pip3 list and pip3 show xxxyyyzzz

@horatiua
Copy link
Author

Yes, of course.
But how do we update the script in order for that to work?

@YousefAis
Copy link

how do we update the script in order for that to work?

@VimalRughani
Copy link

VimalRughani commented Aug 18, 2024

I had same issue and figure out hack for that
use --break-system-packages with pip install
e.g.
pip install package_name --break-system-packages

Please note that above is just hack solution which I used and worked well for me.
I hope it will help you.

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

No branches or pull requests

5 participants