Comments (10)
Hi,
Did you apt-get install python3
before running this role? That's typically a requirement to run Ansible.
Also where are you running Ubuntu 20.04 on? Is it some cloud provider? Or the stock ISO straight from Ubuntu? Something else?
from ansible-docker.
I did not install python3
, I will try that. It's from the ubuntu ISO.
from ansible-docker.
I see that python3 had been already installed. After making sure it is installed, still got the same issue. I thought maybe it was using the legacy pip, but that doesn't seem to be the case:
monty@server0:~$ which pip
monty@server0:~$ which pip3
/usr/bin/pip3
I installed ansible according to https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html#installing-ansible-on-ubuntu :
$ sudo apt update
$ sudo apt install software-properties-common
$ sudo apt-add-repository --yes --update ppa:ansible/ansible
$ sudo apt install ansible
I'm not sure what I would run manually from the command line to see what's going wrong, especially since I would need to use the virtualenv.
from ansible-docker.
Where are you running Ubuntu 20.04 on? Is it some cloud provider? Or the stock ISO straight from Ubuntu? Something else?
from ansible-docker.
It's local, on a dell T110 II I'm setting up as a media server. Installed from the Ubuntu desktop 20.04 ISO
from ansible-docker.
What's interesting is your error mentions a lack of setuptools
being installed but this role installs python3-setuptools
for you automatically.
Are you running Python 2.x?
from ansible-docker.
Yeah it looks like python 2 is the default.
monty@server0:~$ python --version
Python 2.7.18
And yes, I saw python3-setuptools
is installed and the virtualenv is specified, though I noticed this piece of the debug output -- I don't know why the virtualenv_python
would be null.
"virtualenv": "/usr/local/lib/docker/virtualenv",
"virtualenv_command": "virtualenv",
"virtualenv_python": null,
"virtualenv_site_packages": false
from ansible-docker.
Also noticing that that virtualenv dir is missing
monty@server0:~$ sudo ls /usr/local/lib/docker/
ls: cannot access '/usr/local/lib/docker/': No such file or directory
monty@server0:~$ sudo ls /usr/local/lib/
python2.7 python3.8
from ansible-docker.
Ubuntu 20.04 LTS shouldn't have Python 2 installed based on the release notes:
In 20.04 LTS, the python included in the base system is Python 3.8. Python 2.7 has been moved to universe and is not included by default in any new installs.
How did your system end up with Python 2.x on it? Maybe it's because it's the desktop edition and not server? I'm not sure to be honest. I only ever ran this role on the server variant.
In any case I think there's maybe a few ways to address this:
-
In your
inventory/group_vars/all.yml
file putansible_python_interpreter: "/usr/bin/python3"
-
Change the "Install Python packages" task in
tasks/main.yml
by adding this property to the pip module:virtualenv_python: "python3"
.
Let me know if the 2nd one works btw because I had just added that to this role this morning to potentially fix another issue and haven't pushed the change yet.
from ansible-docker.
Just #2 wasn't sufficient, but those two together did fix this issue and I was able to install successfully. Thanks so much for your help!
from ansible-docker.
Related Issues (20)
- Support for docker.io package (in addition to ce and ee) HOT 4
- Failed : Install Docker's dependencies HOT 9
- Package dependency error for Docker installation on clean Ubuntu 18.04 HOT 11
- Avoid docker login issue with X11 HOT 11
- Expected behavior for DockerHub private repositories login options? HOT 19
- Failed to import the required Python library HOT 10
- Update apt cache before installing packages HOT 1
- Add way to add additional packages to install HOT 3
- Versioning pinning not working HOT 5
- Install Python packages: Could not get output from /usr/local/bin/virtualenv --help HOT 16
- Hi; Please consider suppressing credentials output in: Manage Docker registry login credentials HOT 8
- Upgrade edge case HOT 9
- I'm thinking about no longer setting up a virtualenv, pip installing docker / docker compose and switching the docker_login module to a shell script HOT 2
- docker not installed into /usr/local/bin HOT 4
- Unable to find pip in the virtualenv HOT 8
- Error in new v2.2.0 version when using ansible 2.9.14 HOT 3
- Docker Compose V1 causes the Install Python packages step to crash HOT 3
- Error with pip on basic usage HOT 2
- Task exception at: Install Python packages HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ansible-docker.