Open thomasdziedzic-pd opened 4 years ago
I can reproduce the issue with the local kitchen tests using kitchen test Python3and2-pip18-ubuntu-1604
, I will attach the full log,
Python3and2-pip18-ubuntu-1604.log
The relevant message from the log is at:
[2020-02-26T15:30:52+00:00] FATAL: Mixlib::ShellOut::ShellCommandFailed: python_runtime[3] (poise-python::default line 25) had an error: Mixlib::ShellOut::ShellCommandFailed: python_package[setuptools] (/tmp/kitchen/cache/cookbooks/poise-python/files/halite_gem/poise_python/python_providers/base.rb line 160) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of ["/usr/bin/python3.5", "-", "setuptools"] ----
STDOUT:
STDERR: Traceback (most recent call last):
File "<stdin>", line 17, in <module>
ImportError: No module named 'pip.commands'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 22, in <module>
ImportError: cannot import name 'InstallCommand'
---- End output of ["/usr/bin/python3.5", "-", "setuptools"] ----
Ran ["/usr/bin/python3.5", "-", "setuptools"] returned 1
which is the same error message that I get when trying to use the cookbook.
I applied the patch located at https://github.com/shareaholic/poise-python/commit/929195a7381afd50c458edb4bfe5f86b1d965dad and it seems to have made the job succeed.
Hi @thomasdziedzic-pd thanks for reporting the issue. If you have time to submit a PR that would be amazing, otherwise I can work on integrating your changes to this cookbook sometime next week. Also, you might want to remove your public IP from the logs in the description if you care about such things.
. If you have time to submit a PR that would be amazing
I'm trying to figure out some permissions issue with forking cookbooks, if I manage to figure it out I will try and submit one!
Also, you might want to remove your public IP from the logs in the description if you care about such things.
The machine was already decommissioned by the time I posted the logs.
As a follow up to:
I'm trying to figure out some permissions issue with forking cookbooks, if I manage to figure it out I will try and submit one!
I wasn't able to resolve this so I wont be submitting a PR unfortunately.
@thomasdziedzic-pd super sorry for the delay on this. I'll follow up by end of month. My apologies.
Here is my first round fix for this:
I overlayed ndpgroup/poise-python changes over your generated cookbook in addition to fixing this bug, but the hack script changes in that should be able to be grabbed without also pulling in the other changes.
I have the following lines in my recipe to try to install python2:
When I tried to provision a new host, I got the following error message:
This might be related to https://github.com/enova/enova-python/pull/3#issuecomment-520536318 since they had an error in the CI during setuptools install as well.
Thanks for your time!