0

I would like to downgrade my current Ansible Version as this is not compatible with my Cisco Collection that i need to use for my network. I tried the command sudo pip install ansible==2.15.0 but i got some errors. Look 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.

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.`

I'm not a linux or ansible guru , its just my first week on that and i try to set up my lab. I use WSL for Linux.

Thanks

George
  • 1

1 Answers1

0

Basically it is complaining that you are trying to install a package into global Python environment. Which is used by other services, programs, etc. (not sure how that works exactly in case of WSL for Linux). And installing extra dependencies might break global Python installation.

There are couple of ways you can fix that and it was answered here

In most cases, it is best to create isolated Python environment and install necessary packages for a specific project you are working on.