-
Notifications
You must be signed in to change notification settings - Fork 23.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pip: No setuptools found in remote host, please install it first. #47361
Comments
Hi @chopraaa, thank you for submitting this issue! |
Files identified in the description: If these files are inaccurate, please update the |
cc @HD650 |
Just encountered this after upgrading from 2.6.5 to 2.7.0 - maybe this isn't a 2.8 issue? Is there a known workaround? |
Like I said, it works on 2.6 but not on 2.8. Now we know it doesn't work on 2.7 either. :-) As a workaround, you can remove this check: ansible/lib/ansible/modules/packaging/language/pip.py Lines 562 to 563 in 06d2301
|
Great, I seem to have worked around it by installing the |
It‘s because the remote machine has no |
@HD650 I need python2 setuptools for using python3? |
When running with
We can see it executing |
I don't understand why. I have
This can be closed if intentional. I don't mean to step on anyone's toes. |
@chopraaa I think the problem is:
|
afaict, there is a design bug that causes this. the pip module code checks whether setuptools is available in the site packages that itself is using. that may be false, even though the interpreter selected with i cannot comprehend why @HD650 added this with 501503f, it doesn't seem to be functionally related to the feature the commit provides. |
sorry, i should have properly read the post above that explains why setuptools is needed. |
I'm running ansible 2.7.0, using python3, Ubuntu 16.04, and am having the same problem. I have python3-setuptools installed . Tried to update pip with this:
(where VENV points to where my virtual env is stored) and got the error complaining about setuptools not being found:
The pip module should pick pip3 since in my venv
|
I got the same error, so replaced the pip module with the command module and it works just fine: before:
after:
It seems to me that the setuptool check is either flawed or unnecessary. |
I am having this same problem when using It seems that the 2.6 works, 2.7+ doesn't. |
The problem is that Again, this worked prior to 2.7. |
One way to solve this would be to check the exit code of |
@mkjpryor-stfc This was I think this is done to check which packages are installed now. Hopefully they can update the documentation the next time they introduce a breaking change. |
I've locked the conversation as the damage has been done and Just to clarify the situation, |
@jborean93 actually, there are also complications in how ansible parses module arguments, so we needed to reconstruct actual package specs and to checks on the module side. I believe it's not possible to have such a feature (unless we vendor things). |
SUMMARY
pip
seems to be broken in 2.8.ISSUE TYPE
COMPONENT NAME
pip
ANSIBLE VERSION
STEPS TO REPRODUCE
The following works in Ansible 2.6 without errors:
But in Ansible 2.8:
EXPECTED RESULTS
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: