Issue with Pip installation

Multi tool use
Multi tool use












0














Two Issues:



First one is that am trying to call a JSON API using python for which I used 'Import Request' in my code. But got an error stating : No module named 'requests'



Secondly when i try to install pip,on cmd, i get an error that states - Could not fetch URL https://pypi.org/simple/pip:



My code might be wrong. Please help to get this resolved.



Error on Command prompt:




C:UsersMEIPEDesktop>python get-pip.py
Collecting pip
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)'))': /simple/pip/ Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None))
after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)'))': /simple/pip/ Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)'))': /simple/pip/ Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)'))': /simple/pip/ Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)'))': /simple/pip/ Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLCertVerificationError
(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)'))) - skipping Could not find a version that satisfies the requirement pip (from versions: )No matching distribution found for pip Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)'))) - skipping




Code:



import urllib.parse
import requests

main_api = 'http://nagiosdatagateway.vestas.net/esq/ITE1452552/logstash-?'

date = '2018.12.16'
url = main_api + urllib.parse.urlencode({'date':date})

json_date = requests.get(url).json()

print(json_data)


Want to call a dynamically changing JSON API url and store the data in a SQL Server table. This would help me to schedule a python script to be executed daily to get JSON data and then from the SQL table, i will get monthly reports.










share|improve this question




















  • 1




    didn't pip come with your python distribution? I believe it usually is packaged with it
    – AJS
    Dec 27 at 12:42










  • try pip --help in your CMD, if you see an output it should already be there
    – AJS
    Dec 27 at 12:42










  • What operating system is this? If the certificate for pypi.org failed to validate, can you confirm that you have the DigiCert root CA cert installed in your operating system trust store? Also: what version of Python is this, and how was it installed? You might just need to install a newer Python interpreter.
    – Daniel Pryden
    Dec 27 at 12:55










  • Thanks, did check. Yes its installed. But when i typed pip install requests it threw error: Proxy Error I suppose. Similar to one mentioned above
    – Maria
    Dec 27 at 12:59


















0














Two Issues:



First one is that am trying to call a JSON API using python for which I used 'Import Request' in my code. But got an error stating : No module named 'requests'



Secondly when i try to install pip,on cmd, i get an error that states - Could not fetch URL https://pypi.org/simple/pip:



My code might be wrong. Please help to get this resolved.



Error on Command prompt:




C:UsersMEIPEDesktop>python get-pip.py
Collecting pip
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)'))': /simple/pip/ Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None))
after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)'))': /simple/pip/ Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)'))': /simple/pip/ Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)'))': /simple/pip/ Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)'))': /simple/pip/ Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLCertVerificationError
(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)'))) - skipping Could not find a version that satisfies the requirement pip (from versions: )No matching distribution found for pip Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)'))) - skipping




Code:



import urllib.parse
import requests

main_api = 'http://nagiosdatagateway.vestas.net/esq/ITE1452552/logstash-?'

date = '2018.12.16'
url = main_api + urllib.parse.urlencode({'date':date})

json_date = requests.get(url).json()

print(json_data)


Want to call a dynamically changing JSON API url and store the data in a SQL Server table. This would help me to schedule a python script to be executed daily to get JSON data and then from the SQL table, i will get monthly reports.










share|improve this question




















  • 1




    didn't pip come with your python distribution? I believe it usually is packaged with it
    – AJS
    Dec 27 at 12:42










  • try pip --help in your CMD, if you see an output it should already be there
    – AJS
    Dec 27 at 12:42










  • What operating system is this? If the certificate for pypi.org failed to validate, can you confirm that you have the DigiCert root CA cert installed in your operating system trust store? Also: what version of Python is this, and how was it installed? You might just need to install a newer Python interpreter.
    – Daniel Pryden
    Dec 27 at 12:55










  • Thanks, did check. Yes its installed. But when i typed pip install requests it threw error: Proxy Error I suppose. Similar to one mentioned above
    – Maria
    Dec 27 at 12:59
















0












0








0







Two Issues:



First one is that am trying to call a JSON API using python for which I used 'Import Request' in my code. But got an error stating : No module named 'requests'



Secondly when i try to install pip,on cmd, i get an error that states - Could not fetch URL https://pypi.org/simple/pip:



My code might be wrong. Please help to get this resolved.



Error on Command prompt:




C:UsersMEIPEDesktop>python get-pip.py
Collecting pip
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)'))': /simple/pip/ Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None))
after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)'))': /simple/pip/ Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)'))': /simple/pip/ Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)'))': /simple/pip/ Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)'))': /simple/pip/ Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLCertVerificationError
(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)'))) - skipping Could not find a version that satisfies the requirement pip (from versions: )No matching distribution found for pip Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)'))) - skipping




Code:



import urllib.parse
import requests

main_api = 'http://nagiosdatagateway.vestas.net/esq/ITE1452552/logstash-?'

date = '2018.12.16'
url = main_api + urllib.parse.urlencode({'date':date})

json_date = requests.get(url).json()

print(json_data)


Want to call a dynamically changing JSON API url and store the data in a SQL Server table. This would help me to schedule a python script to be executed daily to get JSON data and then from the SQL table, i will get monthly reports.










share|improve this question















Two Issues:



First one is that am trying to call a JSON API using python for which I used 'Import Request' in my code. But got an error stating : No module named 'requests'



Secondly when i try to install pip,on cmd, i get an error that states - Could not fetch URL https://pypi.org/simple/pip:



My code might be wrong. Please help to get this resolved.



Error on Command prompt:




C:UsersMEIPEDesktop>python get-pip.py
Collecting pip
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)'))': /simple/pip/ Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None))
after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)'))': /simple/pip/ Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)'))': /simple/pip/ Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)'))': /simple/pip/ Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)'))': /simple/pip/ Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLCertVerificationError
(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)'))) - skipping Could not find a version that satisfies the requirement pip (from versions: )No matching distribution found for pip Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)'))) - skipping




Code:



import urllib.parse
import requests

main_api = 'http://nagiosdatagateway.vestas.net/esq/ITE1452552/logstash-?'

date = '2018.12.16'
url = main_api + urllib.parse.urlencode({'date':date})

json_date = requests.get(url).json()

print(json_data)


Want to call a dynamically changing JSON API url and store the data in a SQL Server table. This would help me to schedule a python script to be executed daily to get JSON data and then from the SQL table, i will get monthly reports.







python installation pip






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 27 at 12:31









yatu

4,4271423




4,4271423










asked Dec 27 at 12:25









Maria

11




11








  • 1




    didn't pip come with your python distribution? I believe it usually is packaged with it
    – AJS
    Dec 27 at 12:42










  • try pip --help in your CMD, if you see an output it should already be there
    – AJS
    Dec 27 at 12:42










  • What operating system is this? If the certificate for pypi.org failed to validate, can you confirm that you have the DigiCert root CA cert installed in your operating system trust store? Also: what version of Python is this, and how was it installed? You might just need to install a newer Python interpreter.
    – Daniel Pryden
    Dec 27 at 12:55










  • Thanks, did check. Yes its installed. But when i typed pip install requests it threw error: Proxy Error I suppose. Similar to one mentioned above
    – Maria
    Dec 27 at 12:59
















  • 1




    didn't pip come with your python distribution? I believe it usually is packaged with it
    – AJS
    Dec 27 at 12:42










  • try pip --help in your CMD, if you see an output it should already be there
    – AJS
    Dec 27 at 12:42










  • What operating system is this? If the certificate for pypi.org failed to validate, can you confirm that you have the DigiCert root CA cert installed in your operating system trust store? Also: what version of Python is this, and how was it installed? You might just need to install a newer Python interpreter.
    – Daniel Pryden
    Dec 27 at 12:55










  • Thanks, did check. Yes its installed. But when i typed pip install requests it threw error: Proxy Error I suppose. Similar to one mentioned above
    – Maria
    Dec 27 at 12:59










1




1




didn't pip come with your python distribution? I believe it usually is packaged with it
– AJS
Dec 27 at 12:42




didn't pip come with your python distribution? I believe it usually is packaged with it
– AJS
Dec 27 at 12:42












try pip --help in your CMD, if you see an output it should already be there
– AJS
Dec 27 at 12:42




try pip --help in your CMD, if you see an output it should already be there
– AJS
Dec 27 at 12:42












What operating system is this? If the certificate for pypi.org failed to validate, can you confirm that you have the DigiCert root CA cert installed in your operating system trust store? Also: what version of Python is this, and how was it installed? You might just need to install a newer Python interpreter.
– Daniel Pryden
Dec 27 at 12:55




What operating system is this? If the certificate for pypi.org failed to validate, can you confirm that you have the DigiCert root CA cert installed in your operating system trust store? Also: what version of Python is this, and how was it installed? You might just need to install a newer Python interpreter.
– Daniel Pryden
Dec 27 at 12:55












Thanks, did check. Yes its installed. But when i typed pip install requests it threw error: Proxy Error I suppose. Similar to one mentioned above
– Maria
Dec 27 at 12:59






Thanks, did check. Yes its installed. But when i typed pip install requests it threw error: Proxy Error I suppose. Similar to one mentioned above
– Maria
Dec 27 at 12:59














1 Answer
1






active

oldest

votes


















2














No module named 'requests':



This simply means you have not installed the package "requests", it is solved (like you probably found out, judging from the other issue) by installing pip and running the command:



pip install requests


PIP issue:



The error you are getting from pip indicates that the SSL certificates are not correct.



This can happen if you are behind a proxy which repackages the SSL communication using its own certificate, then you need to add that certificate to the ones used by requests (requests uses certifi to know which certificates to trust, not the operating systems certificates).



You can do this by setting the environment variable "REQUESTS_CA_BUNDLE" to a bundle which contains the proxy certificate you need.



Another way to get pip to work is to bypass the security by telling pip you trust the hosts, regardless of the bad certificates, by using the flag "--trusted-host" with each of the hosts.



python get-pip.py --trusted-host=pypi.org --trusted-host=...


You will probably have to repeat this step as pip fails on the first SSL verification error, so each time it will fail on a new one until all are added






share|improve this answer










New contributor




SimonF is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.


















  • I found this .. and please let me know if itsokay to install older version : stackoverflow.com/questions/25835554/…
    – Maria
    Dec 27 at 13:43












  • What do you mean? Did you try any of the suggestions?
    – SimonF
    Dec 27 at 15:31










  • Yes, I tried. It din not work. And stackoverflow.com/questions/25835554/… The article states : Difference between python3 and python2 Here's where it starts to get interesting: I don't get the same issue when using python2.7: "I get the error in python3.4 but not python2.7 even though the cert.pem used in both cases is exactly the same."
    – Maria
    2 days ago












  • Did you try the alternative solution?
    – SimonF
    2 days ago










  • Also, did you check the accepted answer for that issue? It clearly states that the issue occurred because he/she installed the incorrect python3 package. Have you done that?
    – SimonF
    2 days ago











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
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
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53945065%2fissue-with-pip-installation%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









2














No module named 'requests':



This simply means you have not installed the package "requests", it is solved (like you probably found out, judging from the other issue) by installing pip and running the command:



pip install requests


PIP issue:



The error you are getting from pip indicates that the SSL certificates are not correct.



This can happen if you are behind a proxy which repackages the SSL communication using its own certificate, then you need to add that certificate to the ones used by requests (requests uses certifi to know which certificates to trust, not the operating systems certificates).



You can do this by setting the environment variable "REQUESTS_CA_BUNDLE" to a bundle which contains the proxy certificate you need.



Another way to get pip to work is to bypass the security by telling pip you trust the hosts, regardless of the bad certificates, by using the flag "--trusted-host" with each of the hosts.



python get-pip.py --trusted-host=pypi.org --trusted-host=...


You will probably have to repeat this step as pip fails on the first SSL verification error, so each time it will fail on a new one until all are added






share|improve this answer










New contributor




SimonF is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.


















  • I found this .. and please let me know if itsokay to install older version : stackoverflow.com/questions/25835554/…
    – Maria
    Dec 27 at 13:43












  • What do you mean? Did you try any of the suggestions?
    – SimonF
    Dec 27 at 15:31










  • Yes, I tried. It din not work. And stackoverflow.com/questions/25835554/… The article states : Difference between python3 and python2 Here's where it starts to get interesting: I don't get the same issue when using python2.7: "I get the error in python3.4 but not python2.7 even though the cert.pem used in both cases is exactly the same."
    – Maria
    2 days ago












  • Did you try the alternative solution?
    – SimonF
    2 days ago










  • Also, did you check the accepted answer for that issue? It clearly states that the issue occurred because he/she installed the incorrect python3 package. Have you done that?
    – SimonF
    2 days ago
















2














No module named 'requests':



This simply means you have not installed the package "requests", it is solved (like you probably found out, judging from the other issue) by installing pip and running the command:



pip install requests


PIP issue:



The error you are getting from pip indicates that the SSL certificates are not correct.



This can happen if you are behind a proxy which repackages the SSL communication using its own certificate, then you need to add that certificate to the ones used by requests (requests uses certifi to know which certificates to trust, not the operating systems certificates).



You can do this by setting the environment variable "REQUESTS_CA_BUNDLE" to a bundle which contains the proxy certificate you need.



Another way to get pip to work is to bypass the security by telling pip you trust the hosts, regardless of the bad certificates, by using the flag "--trusted-host" with each of the hosts.



python get-pip.py --trusted-host=pypi.org --trusted-host=...


You will probably have to repeat this step as pip fails on the first SSL verification error, so each time it will fail on a new one until all are added






share|improve this answer










New contributor




SimonF is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.


















  • I found this .. and please let me know if itsokay to install older version : stackoverflow.com/questions/25835554/…
    – Maria
    Dec 27 at 13:43












  • What do you mean? Did you try any of the suggestions?
    – SimonF
    Dec 27 at 15:31










  • Yes, I tried. It din not work. And stackoverflow.com/questions/25835554/… The article states : Difference between python3 and python2 Here's where it starts to get interesting: I don't get the same issue when using python2.7: "I get the error in python3.4 but not python2.7 even though the cert.pem used in both cases is exactly the same."
    – Maria
    2 days ago












  • Did you try the alternative solution?
    – SimonF
    2 days ago










  • Also, did you check the accepted answer for that issue? It clearly states that the issue occurred because he/she installed the incorrect python3 package. Have you done that?
    – SimonF
    2 days ago














2












2








2






No module named 'requests':



This simply means you have not installed the package "requests", it is solved (like you probably found out, judging from the other issue) by installing pip and running the command:



pip install requests


PIP issue:



The error you are getting from pip indicates that the SSL certificates are not correct.



This can happen if you are behind a proxy which repackages the SSL communication using its own certificate, then you need to add that certificate to the ones used by requests (requests uses certifi to know which certificates to trust, not the operating systems certificates).



You can do this by setting the environment variable "REQUESTS_CA_BUNDLE" to a bundle which contains the proxy certificate you need.



Another way to get pip to work is to bypass the security by telling pip you trust the hosts, regardless of the bad certificates, by using the flag "--trusted-host" with each of the hosts.



python get-pip.py --trusted-host=pypi.org --trusted-host=...


You will probably have to repeat this step as pip fails on the first SSL verification error, so each time it will fail on a new one until all are added






share|improve this answer










New contributor




SimonF is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









No module named 'requests':



This simply means you have not installed the package "requests", it is solved (like you probably found out, judging from the other issue) by installing pip and running the command:



pip install requests


PIP issue:



The error you are getting from pip indicates that the SSL certificates are not correct.



This can happen if you are behind a proxy which repackages the SSL communication using its own certificate, then you need to add that certificate to the ones used by requests (requests uses certifi to know which certificates to trust, not the operating systems certificates).



You can do this by setting the environment variable "REQUESTS_CA_BUNDLE" to a bundle which contains the proxy certificate you need.



Another way to get pip to work is to bypass the security by telling pip you trust the hosts, regardless of the bad certificates, by using the flag "--trusted-host" with each of the hosts.



python get-pip.py --trusted-host=pypi.org --trusted-host=...


You will probably have to repeat this step as pip fails on the first SSL verification error, so each time it will fail on a new one until all are added







share|improve this answer










New contributor




SimonF is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this answer



share|improve this answer








edited Dec 27 at 15:46





















New contributor




SimonF is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









answered Dec 27 at 13:13









SimonF

54811




54811




New contributor




SimonF is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





SimonF is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






SimonF is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












  • I found this .. and please let me know if itsokay to install older version : stackoverflow.com/questions/25835554/…
    – Maria
    Dec 27 at 13:43












  • What do you mean? Did you try any of the suggestions?
    – SimonF
    Dec 27 at 15:31










  • Yes, I tried. It din not work. And stackoverflow.com/questions/25835554/… The article states : Difference between python3 and python2 Here's where it starts to get interesting: I don't get the same issue when using python2.7: "I get the error in python3.4 but not python2.7 even though the cert.pem used in both cases is exactly the same."
    – Maria
    2 days ago












  • Did you try the alternative solution?
    – SimonF
    2 days ago










  • Also, did you check the accepted answer for that issue? It clearly states that the issue occurred because he/she installed the incorrect python3 package. Have you done that?
    – SimonF
    2 days ago


















  • I found this .. and please let me know if itsokay to install older version : stackoverflow.com/questions/25835554/…
    – Maria
    Dec 27 at 13:43












  • What do you mean? Did you try any of the suggestions?
    – SimonF
    Dec 27 at 15:31










  • Yes, I tried. It din not work. And stackoverflow.com/questions/25835554/… The article states : Difference between python3 and python2 Here's where it starts to get interesting: I don't get the same issue when using python2.7: "I get the error in python3.4 but not python2.7 even though the cert.pem used in both cases is exactly the same."
    – Maria
    2 days ago












  • Did you try the alternative solution?
    – SimonF
    2 days ago










  • Also, did you check the accepted answer for that issue? It clearly states that the issue occurred because he/she installed the incorrect python3 package. Have you done that?
    – SimonF
    2 days ago
















I found this .. and please let me know if itsokay to install older version : stackoverflow.com/questions/25835554/…
– Maria
Dec 27 at 13:43






I found this .. and please let me know if itsokay to install older version : stackoverflow.com/questions/25835554/…
– Maria
Dec 27 at 13:43














What do you mean? Did you try any of the suggestions?
– SimonF
Dec 27 at 15:31




What do you mean? Did you try any of the suggestions?
– SimonF
Dec 27 at 15:31












Yes, I tried. It din not work. And stackoverflow.com/questions/25835554/… The article states : Difference between python3 and python2 Here's where it starts to get interesting: I don't get the same issue when using python2.7: "I get the error in python3.4 but not python2.7 even though the cert.pem used in both cases is exactly the same."
– Maria
2 days ago






Yes, I tried. It din not work. And stackoverflow.com/questions/25835554/… The article states : Difference between python3 and python2 Here's where it starts to get interesting: I don't get the same issue when using python2.7: "I get the error in python3.4 but not python2.7 even though the cert.pem used in both cases is exactly the same."
– Maria
2 days ago














Did you try the alternative solution?
– SimonF
2 days ago




Did you try the alternative solution?
– SimonF
2 days ago












Also, did you check the accepted answer for that issue? It clearly states that the issue occurred because he/she installed the incorrect python3 package. Have you done that?
– SimonF
2 days ago




Also, did you check the accepted answer for that issue? It clearly states that the issue occurred because he/she installed the incorrect python3 package. Have you done that?
– SimonF
2 days ago


















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • 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.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53945065%2fissue-with-pip-installation%23new-answer', 'question_page');
}
);

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







8Zf5B9DcOZg OY4QUany eWBIIEQSBuCU YfRwREseoq6VnOwAmr,E MIYPmTq5Qq87XmVxSIL
2J2c3ktrI4UT Jm CltAx Wmd6s7Y2T9osCuZaL

Popular posts from this blog

Monofisismo

Angular Downloading a file using contenturl with Basic Authentication

Olmecas