Install issues on Ubuntu 24 LTS #2704
-
|
What are the exact steps to install on Ubuntu 24 LTS with Python 3.12 or newer? Trying to avoid using root account, and trying to avoid installing python components with pip3 --break-system-packages. Does the current install pass any automated tests on Ubuntu 24 LTS? Status thus far: Success, as user with sudo permissions, netlab install ubuntu Fails, as user with sudo permissions, netlab install ansible Output: Install baseline Python components [FATAL] Installation script ansible.sh failed, exiting Using a python virtual environment activated doesn't change results, ansible continues to fail install. I'll take a stab at running the ansible.sh statements manually. sudo is necessary for apt installation of packages, but the python install components should all work without sudo, relying on user virtual environment. Preferably, scripts can be updated to use uv. |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 10 replies
-
Exactly what you're doing...
... but without this particular restriction ;)
Yes, but with the "--break-system-packages" ;) That's how I create throwaway VMs for OS-specific testing.
On a more serious note, installing into a virtual environment should work, but I haven't tested it in a long while. Will try it out and fix stuff if needed. |
Beta Was this translation helpful? Give feedback.
-
|
@robert-patrick-texas So I ran created a fresh Ubuntu VM from Followed by: Please note the Netlab correctly identified it's running in a virtual environment and installed Ansible and other Python packages into that environment. Next, I logged out and logged back in (to get the vagrant user into new groups) and ran the containerlab test: It all worked. |
Beta Was this translation helpful? Give feedback.
-
|
@robert-patrick-texas please note that if you are going to use containers those are running in privileged mode, if I am not mistaken. Which means that running them anywhere, but scratch system might be a bad idea. |
Beta Was this translation helpful? Give feedback.
-
|
@robert-patrick-texas -- If the suggested procedure works for you, I'll update the Ubuntu installation documentation to describe steps needed to install everything into a virtual environment. As for...
... once it's part of a LTS Ubuntu distro, I'd be willing to merge a PR that implements uv while retaining backward compatibility with previous Ubuntu releases. Until then, I'm in no rush to add another variant that needs to be tested. |
Beta Was this translation helpful? Give feedback.
-
|
This worked using uv to install ansible versus the ansible.sh script; performed late last night before today's testing was completed. Going forward, agreed to sticking with base pip3 install mode into a virtual environment for netlab install ansible. Recommended prereq - add your user account to the sudo group and set sudo to run without password ! as user, change to home directory and install uv, netlab install ubuntu ! ansible installs with uv into virtual environment successfully; ultimate fix was including system-site-packages for venv ! logout and log back in ! upon next login, check output from groups to ensure user account has access to libvirt, clab_admins and docker ! enter python virtual environment, consider an alias to expedite this ! execute tests to confirm ready for operation PS - uv is fast; hopefully it'll get pulled into Ubuntu and other distros in the near future |
Beta Was this translation helpful? Give feedback.
-
|
Updated documentation (e51bee1) based on your feedback. Thanks again! |
Beta Was this translation helpful? Give feedback.
@robert-patrick-texas So I ran created a fresh Ubuntu VM from
bento/ubuntu-24.04Vagrant box (https://portal.cloud.hashicorp.com/vagrant/discover/bento/ubuntu-24.04), then ranFollowed by:
Please note the
--system-site-packagesparameter used at virtual environment creation (based on reply by @a-v-popov)Netlab correctly identified it's running in a virtual environment and installed Ansible and other Python packages into that environment.
Next, I logged out and logged back in …