-
-
Notifications
You must be signed in to change notification settings - Fork 641
PIP failing to install inside VM if Ansible local provisioner used #2138
Comments
For further information I joined a chat on the vagrant issue queue about this (hashicorp/vagrant#12155) and someone pointed me to the following news which confirms that something happened with PIP in the last few days. They have dropped support for Python2 and Python 3.5: https://pip.pypa.io/en/stable/news/#id1 Apparently this install command works for Python3:
|
Another solution with an open PR is here: #2137 IMHO it's a bit more elegant, mainly because it's a two line change. |
Oh cool. I'll try that out. Didn't even realise pip3 was an option. Update I guess changing the base box would mean everyone having to update to the latest box? Changing the command would avoid needing a new base box but it's a bit clunky. ;-) |
Issue has also been reported to stack exchange: |
If you use the changes in #2137 , the provisioning installs |
I just merged the PR and it does seem like that should solve the problem if you don't have Ansible installed on your host computer. This fix will make it into the next Drupal VM release, but I don't have time to tag / push it currently, so please use the dev master version until then. |
if using composer this works as well if you don't want to use the master branch:
would be good to have a new release though, as this is breaking current vm the moment they get rebuilt |
@siliconmeadow Looks like i need to do less talking and more thorough testing. ;-) Awesome. Thanks for teaching me something. :-) |
This is fixed... will be in the 6.0.3 release to be out soon: #2147 |
Issue Type
Your Environment
Your OS
Full console output
This is the provisioning output.
Summary
I'm not sure if this is a vagrant problem or something that needs to change on the base box. This error has only just started happening. According to something i read, it looks like a problem relating to using Python2 instead of Python3 to execute that script. Apparently Python2 has reached End Of Life.
If you run it this manually you still get errors relating to missing dependencies
I managed to create a workaround by adding this to my Vagrantfile.local to change the method of pip installation:
This seems a pretty hacky but it does work in the short term.
To make this work out of the box, does something need to happen to the base box so that the default pip installation command works with python3?
If everything is working as planned is there a better way to override the ansible.pip_install_cmd? Would be nice to have that option as drupalvm config. Or should I just rework it as a SHELL provisioner in Vagrantfile.local?
The text was updated successfully, but these errors were encountered: