-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
ImportError: No module named 'requests.packages.urllib3' #5104
Comments
How did you install certbot? |
@SwartzCr Yes,I did it following https://certbot.eff.org/#centosrhel7-nginx |
He seems to have the latest version of requests already, and six is there, so it's a different situation than #4884. |
On CentOS 7, the only way to get urllib3 (1.22) is using pip install. The yum version with epel is very old: python-urllib3.noarch 0:1.10.2-3.el7 and triggers a wrong version error. But, after installing certbot-apache with urllib3 v.1.22 in place, you get this when running certbot --apache: |
Update. This seems to have fixed it...
|
But then you get this when running certbot --apache: |
Seeing the same issue on a brand new installation of centos 7.3. Also tried installing |
I've tried installing an older version, 0.14.0, got the same error. I went down the manual route, that worked, I got my cert successfully. |
@wardmundy and @akosveres the rand issue was fixed in 7f5f647 |
I tried to install certbot on Centos 7 today. I follow this https://certbot.eff.org/#centosrhel7-other step by step. after I run |
I got the same error like @Deronlee . |
@jcguevara finally I found the best way is use docker |
At least in some of these cases, I'm suspicious of corrupted Python environments where packages have been If you've already found yourself in this position, I recommend you use certbot-auto which has a minimal reliance on the Python packages found on your system. |
@jcguevara Thanks. I will try it later. |
cerbot-auto surprisingly works! why are there so many extra tools to do this? ( ˇˍˇ ) |
reason:
How to fix:brew uninstall openssl@1.1
# openssl: stable 1.0.2l
brew install openssl
|
After run this command As @Deronlee said:
I install pyOpenSSL version 16.2.0 and it worked for me. |
Thanks. I try to install the lastest version but not working. Maybe I
should try the special version
…On Nov 11, 2017 1:04 AM, "Nguyễn Thanh Tiến" ***@***.***> wrote:
After run this command
pip install requests urllib3 pyOpenSSL --force --upgrade
As @Deronlee <https://github.com/deronlee> said:
the error message change to
ImportError: 'pyOpenSSL' module missing required functionality. Try
upgrading to v0.14 or newer.
I install pyOpenSSL version 16.2.0 and it worked for me.
pip install pyOpenSSL==16.2.0
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5104 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ALj8rHCKhYhwrgCEfvzwVaveagxIVMmtks5s1IIBgaJpZM4PUFnt>
.
|
@thanhtien522 |
@Deronlee can you tell me:
|
@SwartzCr I have the same issue with @Deronlee
|
It looks like foremost we need to bump the version of pyOpenSSL that we depend on for certbot in centos, here's what I get on a fresh install:
Where it should probably be a version over 0.14 |
Yes, hogarthj is our Red Hat/Fedora packaging contact but is more responsive over email. I'm happy to introduce you sometime, but I don't think there are any changes needed on his end here. CentOS 7 is one of our more popular platforms and we regularly test on CentOS 7 without issue. Most of the people in this thread report having requests 2.18.x. Requests 2.6.0 is included in the CentOS 7 repos. If you mix Python packages from your OS and People on CentOS 7 having this issue can work around the problem by undoing the changes to their Python packages done through |
I followed these instructions (my version of urllib3 didn't work as well) and then certbot could be executed... Hopefully that helps. I'm sure these can be collapsed into less commands... pip uninstall requests |
I has try it ,use these commands, and it works !
|
do we can use pip later in future after using yum? |
@sreezree you should not use pip to install certbot related packages as they will conflict with the ones that certbot installs |
None of those methods mentioned above work for me, the error message remains the same. |
I run into the same error on CentOS 7.4: |
I got same error. I found that has an error when install certbot
and I try reinstall it then got same error
it's failed but final show so i gg found tianchao friends said it's conflict with pip version https://blog.csdn.net/u013614281/article/details/76832818 and i uninstall pip version and instal yum version
after that i got another error
so, what fuck, i'm crying 😭 after that tried
and it works ..... so i think is requests version not match urllib3 so it tried in anther same env machine first remove requests and urllib3
install certbot that OK |
This error is actually printed because of a failed try..catch in the internal python code of requests :
This issue happens when urllib3 cannot be found, but also when urllib3 cannot be loaded for whatever reason. |
You can remove the old cerbot, and then try to install it via pip. which should work.
|
Great, problem resolved ! |
Install by certbot-auto script is recommend, which have not this issue. |
To clarify, the recommended installation method on RHEL 7 based systems is to use EPEL. The problems in this thread are usually caused by having a broken Python installation caused by packages installed from |
imagine this worked on 2022 thx |
I use nginx on centos 7.3,there is an error when running
certbot --nginx
:ImportError: No module named 'requests.packages.urllib3'
packages:
What should I do?
The text was updated successfully, but these errors were encountered: