pip: AttributeError: 'module' object has no attribute 'SSL_ST_INIT'
With pip
on Ubuntu 14.04, I am getting this error:
Traceback (most recent call last):
File "/usr/bin/pip", line 9, in <module>
from pip import main
File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 21, in <module>
from pip._vendor.requests.packages.urllib3.exceptions import DependencyWarning
File "/usr/lib/python2.7/dist-packages/pip/_vendor/__init__.py", line 64, in <module>
vendored("cachecontrol")
File "/usr/lib/python2.7/dist-packages/pip/_vendor/__init__.py", line 36, in vendored
__import__(modulename, globals(), locals(), level=0)
File "/usr/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/__init__.py", line 9, in <module>
File "/usr/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/wrapper.py", line 1, in <module>
File "/usr/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/adapter.py", line 4, in <module>
File "/usr/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/__init__.py", line 52, in <module>
File "/usr/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/packages/__init__.py", line 59, in <module>
File "/usr/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/packages/__init__.py", line 32, in vendored
File "/usr/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/contrib/pyopenssl.py", line 47, in <module>
File "/usr/local/lib/python2.7/dist-packages/OpenSSL/__init__.py", line 8, in <module>
from OpenSSL import rand, crypto, SSL
File "/usr/local/lib/python2.7/dist-packages/OpenSSL/SSL.py", line 118, in <module>
SSL_ST_INIT = _lib.SSL_ST_INIT
AttributeError: 'module' object has no attribute 'SSL_ST_INIT'
How can I solve this?
pip
add a comment |
With pip
on Ubuntu 14.04, I am getting this error:
Traceback (most recent call last):
File "/usr/bin/pip", line 9, in <module>
from pip import main
File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 21, in <module>
from pip._vendor.requests.packages.urllib3.exceptions import DependencyWarning
File "/usr/lib/python2.7/dist-packages/pip/_vendor/__init__.py", line 64, in <module>
vendored("cachecontrol")
File "/usr/lib/python2.7/dist-packages/pip/_vendor/__init__.py", line 36, in vendored
__import__(modulename, globals(), locals(), level=0)
File "/usr/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/__init__.py", line 9, in <module>
File "/usr/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/wrapper.py", line 1, in <module>
File "/usr/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/adapter.py", line 4, in <module>
File "/usr/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/__init__.py", line 52, in <module>
File "/usr/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/packages/__init__.py", line 59, in <module>
File "/usr/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/packages/__init__.py", line 32, in vendored
File "/usr/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/contrib/pyopenssl.py", line 47, in <module>
File "/usr/local/lib/python2.7/dist-packages/OpenSSL/__init__.py", line 8, in <module>
from OpenSSL import rand, crypto, SSL
File "/usr/local/lib/python2.7/dist-packages/OpenSSL/SSL.py", line 118, in <module>
SSL_ST_INIT = _lib.SSL_ST_INIT
AttributeError: 'module' object has no attribute 'SSL_ST_INIT'
How can I solve this?
pip
Could you please install pyOpenSSL 16.2.0 and see if this is fixed?
– chazecka
Sep 13 '17 at 18:26
What commands were you running with pip?
– edwinksl
Oct 6 '17 at 15:34
add a comment |
With pip
on Ubuntu 14.04, I am getting this error:
Traceback (most recent call last):
File "/usr/bin/pip", line 9, in <module>
from pip import main
File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 21, in <module>
from pip._vendor.requests.packages.urllib3.exceptions import DependencyWarning
File "/usr/lib/python2.7/dist-packages/pip/_vendor/__init__.py", line 64, in <module>
vendored("cachecontrol")
File "/usr/lib/python2.7/dist-packages/pip/_vendor/__init__.py", line 36, in vendored
__import__(modulename, globals(), locals(), level=0)
File "/usr/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/__init__.py", line 9, in <module>
File "/usr/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/wrapper.py", line 1, in <module>
File "/usr/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/adapter.py", line 4, in <module>
File "/usr/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/__init__.py", line 52, in <module>
File "/usr/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/packages/__init__.py", line 59, in <module>
File "/usr/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/packages/__init__.py", line 32, in vendored
File "/usr/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/contrib/pyopenssl.py", line 47, in <module>
File "/usr/local/lib/python2.7/dist-packages/OpenSSL/__init__.py", line 8, in <module>
from OpenSSL import rand, crypto, SSL
File "/usr/local/lib/python2.7/dist-packages/OpenSSL/SSL.py", line 118, in <module>
SSL_ST_INIT = _lib.SSL_ST_INIT
AttributeError: 'module' object has no attribute 'SSL_ST_INIT'
How can I solve this?
pip
With pip
on Ubuntu 14.04, I am getting this error:
Traceback (most recent call last):
File "/usr/bin/pip", line 9, in <module>
from pip import main
File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 21, in <module>
from pip._vendor.requests.packages.urllib3.exceptions import DependencyWarning
File "/usr/lib/python2.7/dist-packages/pip/_vendor/__init__.py", line 64, in <module>
vendored("cachecontrol")
File "/usr/lib/python2.7/dist-packages/pip/_vendor/__init__.py", line 36, in vendored
__import__(modulename, globals(), locals(), level=0)
File "/usr/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/__init__.py", line 9, in <module>
File "/usr/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/wrapper.py", line 1, in <module>
File "/usr/share/python-wheels/CacheControl-0.11.7-py2.py3-none-any.whl/cachecontrol/adapter.py", line 4, in <module>
File "/usr/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/__init__.py", line 52, in <module>
File "/usr/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/packages/__init__.py", line 59, in <module>
File "/usr/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/packages/__init__.py", line 32, in vendored
File "/usr/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/contrib/pyopenssl.py", line 47, in <module>
File "/usr/local/lib/python2.7/dist-packages/OpenSSL/__init__.py", line 8, in <module>
from OpenSSL import rand, crypto, SSL
File "/usr/local/lib/python2.7/dist-packages/OpenSSL/SSL.py", line 118, in <module>
SSL_ST_INIT = _lib.SSL_ST_INIT
AttributeError: 'module' object has no attribute 'SSL_ST_INIT'
How can I solve this?
pip
pip
edited Sep 13 '17 at 21:12
Zanna
50k13131238
50k13131238
asked Sep 13 '17 at 18:22
queez
1613
1613
Could you please install pyOpenSSL 16.2.0 and see if this is fixed?
– chazecka
Sep 13 '17 at 18:26
What commands were you running with pip?
– edwinksl
Oct 6 '17 at 15:34
add a comment |
Could you please install pyOpenSSL 16.2.0 and see if this is fixed?
– chazecka
Sep 13 '17 at 18:26
What commands were you running with pip?
– edwinksl
Oct 6 '17 at 15:34
Could you please install pyOpenSSL 16.2.0 and see if this is fixed?
– chazecka
Sep 13 '17 at 18:26
Could you please install pyOpenSSL 16.2.0 and see if this is fixed?
– chazecka
Sep 13 '17 at 18:26
What commands were you running with pip?
– edwinksl
Oct 6 '17 at 15:34
What commands were you running with pip?
– edwinksl
Oct 6 '17 at 15:34
add a comment |
5 Answers
5
active
oldest
votes
I found that this answer on stackoverflow helped. Basically, it says that you should do this:
rm -rf /home/<Your Username>/.local/lib/python2.7/site-packages/OpenSSL
sudo rm -rf usr/local/lib/python2.7/dist-packages/OpenSSL/
pip install pyOpenSSL
add a comment |
Use pip3
I had to switch over to using pip3
to resolve this issue:
$ sudo pip3 install --upgrade pyopenssl
add a comment |
yeah pip errors until you fix it manually (chicken and egg mentioned)....find where the library is installed and manually delete it.
On my 16.04 installation I did this:
cd /usr/lib/python2.7/dist-packages
rm -rf OpenSSL
Then pip worked correctly without the SSL error
pip install pyopenssl
2
Removing packages manually from/usr/lib/python*/dist-packages
can be dangerous as it may break package updates from OpenSSL that provide the Python libraries. You should refrain from manually removing files from package-manager-controlled directories when you can.
– Thomas Ward♦
Jul 10 at 14:24
add a comment |
Try this:
sudo apt-get update
sudo easy_install -U cryptography
Then install pyopenssl
package:
pip install pyopenssl
I hope this works. Cheers!
add a comment |
You are missing pyOpenSSL package, or is outdated.
simply run
$ pip install pyopenssl
and update packages (may not be necessary).
2
.....but you can't do that, becausepip
is throwing the error! Classic chicken-and-egg problem here.....
– starbeamrainbowlabs
Apr 26 at 18:26
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f955546%2fpip-attributeerror-module-object-has-no-attribute-ssl-st-init%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
5 Answers
5
active
oldest
votes
5 Answers
5
active
oldest
votes
active
oldest
votes
active
oldest
votes
I found that this answer on stackoverflow helped. Basically, it says that you should do this:
rm -rf /home/<Your Username>/.local/lib/python2.7/site-packages/OpenSSL
sudo rm -rf usr/local/lib/python2.7/dist-packages/OpenSSL/
pip install pyOpenSSL
add a comment |
I found that this answer on stackoverflow helped. Basically, it says that you should do this:
rm -rf /home/<Your Username>/.local/lib/python2.7/site-packages/OpenSSL
sudo rm -rf usr/local/lib/python2.7/dist-packages/OpenSSL/
pip install pyOpenSSL
add a comment |
I found that this answer on stackoverflow helped. Basically, it says that you should do this:
rm -rf /home/<Your Username>/.local/lib/python2.7/site-packages/OpenSSL
sudo rm -rf usr/local/lib/python2.7/dist-packages/OpenSSL/
pip install pyOpenSSL
I found that this answer on stackoverflow helped. Basically, it says that you should do this:
rm -rf /home/<Your Username>/.local/lib/python2.7/site-packages/OpenSSL
sudo rm -rf usr/local/lib/python2.7/dist-packages/OpenSSL/
pip install pyOpenSSL
answered Apr 26 at 18:30
starbeamrainbowlabs
452525
452525
add a comment |
add a comment |
Use pip3
I had to switch over to using pip3
to resolve this issue:
$ sudo pip3 install --upgrade pyopenssl
add a comment |
Use pip3
I had to switch over to using pip3
to resolve this issue:
$ sudo pip3 install --upgrade pyopenssl
add a comment |
Use pip3
I had to switch over to using pip3
to resolve this issue:
$ sudo pip3 install --upgrade pyopenssl
Use pip3
I had to switch over to using pip3
to resolve this issue:
$ sudo pip3 install --upgrade pyopenssl
answered May 30 at 18:08
Serge Stroobandt
2,0031833
2,0031833
add a comment |
add a comment |
yeah pip errors until you fix it manually (chicken and egg mentioned)....find where the library is installed and manually delete it.
On my 16.04 installation I did this:
cd /usr/lib/python2.7/dist-packages
rm -rf OpenSSL
Then pip worked correctly without the SSL error
pip install pyopenssl
2
Removing packages manually from/usr/lib/python*/dist-packages
can be dangerous as it may break package updates from OpenSSL that provide the Python libraries. You should refrain from manually removing files from package-manager-controlled directories when you can.
– Thomas Ward♦
Jul 10 at 14:24
add a comment |
yeah pip errors until you fix it manually (chicken and egg mentioned)....find where the library is installed and manually delete it.
On my 16.04 installation I did this:
cd /usr/lib/python2.7/dist-packages
rm -rf OpenSSL
Then pip worked correctly without the SSL error
pip install pyopenssl
2
Removing packages manually from/usr/lib/python*/dist-packages
can be dangerous as it may break package updates from OpenSSL that provide the Python libraries. You should refrain from manually removing files from package-manager-controlled directories when you can.
– Thomas Ward♦
Jul 10 at 14:24
add a comment |
yeah pip errors until you fix it manually (chicken and egg mentioned)....find where the library is installed and manually delete it.
On my 16.04 installation I did this:
cd /usr/lib/python2.7/dist-packages
rm -rf OpenSSL
Then pip worked correctly without the SSL error
pip install pyopenssl
yeah pip errors until you fix it manually (chicken and egg mentioned)....find where the library is installed and manually delete it.
On my 16.04 installation I did this:
cd /usr/lib/python2.7/dist-packages
rm -rf OpenSSL
Then pip worked correctly without the SSL error
pip install pyopenssl
answered Jul 10 at 14:06
Beerman
39114
39114
2
Removing packages manually from/usr/lib/python*/dist-packages
can be dangerous as it may break package updates from OpenSSL that provide the Python libraries. You should refrain from manually removing files from package-manager-controlled directories when you can.
– Thomas Ward♦
Jul 10 at 14:24
add a comment |
2
Removing packages manually from/usr/lib/python*/dist-packages
can be dangerous as it may break package updates from OpenSSL that provide the Python libraries. You should refrain from manually removing files from package-manager-controlled directories when you can.
– Thomas Ward♦
Jul 10 at 14:24
2
2
Removing packages manually from
/usr/lib/python*/dist-packages
can be dangerous as it may break package updates from OpenSSL that provide the Python libraries. You should refrain from manually removing files from package-manager-controlled directories when you can.– Thomas Ward♦
Jul 10 at 14:24
Removing packages manually from
/usr/lib/python*/dist-packages
can be dangerous as it may break package updates from OpenSSL that provide the Python libraries. You should refrain from manually removing files from package-manager-controlled directories when you can.– Thomas Ward♦
Jul 10 at 14:24
add a comment |
Try this:
sudo apt-get update
sudo easy_install -U cryptography
Then install pyopenssl
package:
pip install pyopenssl
I hope this works. Cheers!
add a comment |
Try this:
sudo apt-get update
sudo easy_install -U cryptography
Then install pyopenssl
package:
pip install pyopenssl
I hope this works. Cheers!
add a comment |
Try this:
sudo apt-get update
sudo easy_install -U cryptography
Then install pyopenssl
package:
pip install pyopenssl
I hope this works. Cheers!
Try this:
sudo apt-get update
sudo easy_install -U cryptography
Then install pyopenssl
package:
pip install pyopenssl
I hope this works. Cheers!
answered Dec 14 at 19:28
Vikas Yadav
1012
1012
add a comment |
add a comment |
You are missing pyOpenSSL package, or is outdated.
simply run
$ pip install pyopenssl
and update packages (may not be necessary).
2
.....but you can't do that, becausepip
is throwing the error! Classic chicken-and-egg problem here.....
– starbeamrainbowlabs
Apr 26 at 18:26
add a comment |
You are missing pyOpenSSL package, or is outdated.
simply run
$ pip install pyopenssl
and update packages (may not be necessary).
2
.....but you can't do that, becausepip
is throwing the error! Classic chicken-and-egg problem here.....
– starbeamrainbowlabs
Apr 26 at 18:26
add a comment |
You are missing pyOpenSSL package, or is outdated.
simply run
$ pip install pyopenssl
and update packages (may not be necessary).
You are missing pyOpenSSL package, or is outdated.
simply run
$ pip install pyopenssl
and update packages (may not be necessary).
answered Sep 13 '17 at 18:30
chazecka
33018
33018
2
.....but you can't do that, becausepip
is throwing the error! Classic chicken-and-egg problem here.....
– starbeamrainbowlabs
Apr 26 at 18:26
add a comment |
2
.....but you can't do that, becausepip
is throwing the error! Classic chicken-and-egg problem here.....
– starbeamrainbowlabs
Apr 26 at 18:26
2
2
.....but you can't do that, because
pip
is throwing the error! Classic chicken-and-egg problem here.....– starbeamrainbowlabs
Apr 26 at 18:26
.....but you can't do that, because
pip
is throwing the error! Classic chicken-and-egg problem here.....– starbeamrainbowlabs
Apr 26 at 18:26
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f955546%2fpip-attributeerror-module-object-has-no-attribute-ssl-st-init%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Could you please install pyOpenSSL 16.2.0 and see if this is fixed?
– chazecka
Sep 13 '17 at 18:26
What commands were you running with pip?
– edwinksl
Oct 6 '17 at 15:34