Giter VIP home page Giter VIP logo

Comments (10)

nickjj avatar nickjj commented on July 24, 2024

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.

montyz avatar montyz commented on July 24, 2024

I did not install python3, I will try that. It's from the ubuntu ISO.

from ansible-docker.

montyz avatar montyz commented on July 24, 2024

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.

nickjj avatar nickjj commented on July 24, 2024

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.

montyz avatar montyz commented on July 24, 2024

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.

nickjj avatar nickjj commented on July 24, 2024

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.

montyz avatar montyz commented on July 24, 2024

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.

montyz avatar montyz commented on July 24, 2024

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.

nickjj avatar nickjj commented on July 24, 2024

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:

  1. In your inventory/group_vars/all.yml file put ansible_python_interpreter: "/usr/bin/python3"

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

montyz avatar montyz commented on July 24, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.