I'm trying to use pip install <package> but it always returns a timeout error as follows:
I'm using Python 3.8 and pip 20.2.1 in Windows Server 2019.
I assume that it's a problem related to pip can't reach pypl.org site.
I checked proxy configuration and it is as follows, i.e., there's no proxy configuration:
What I think is strange is that I can access the site using Chrome and download it manually. I can't find anything that is blocking pip access.
What can that be?
Thanks!
For someone that is facing the same problem, I needed to set a proxy in AWS instance. Now its working like a charm.
I also created two global environment variables
HTTP_PROXY = http://proxyIP:proxyPORT
HTTPS_PROXY = https://proxyIP:proxyPORT
Hope this is usefull for someone else.
Thanks!
Related
I've been following this (https://developer.ibm.com/tutorials/se-distributed-apps-zeromq-part2/) tutorial for setting up a ZeroMQ client/server setup which uses CurveZMQ to encrypt messages. The code works, however whenever I run either the client or the server it instructs me to 'Install tornado itself to use zmq with the tornado IOLoop.'
I've found that the warning appears in any file with the following import statement.
from zmq.eventloop.zmqstream import ZMQStream
I've looked in the code for zmq and noticed that it uses "minitornado", which is likely the problem, but I don't know much about tornado or how to use it.
You need to upgrade pyzmq. You can use this command to force your environment to reinstall updated version. (It worked for me!)
pip install --upgrade --force-reinstall pyzmq
I don't know if it's related to your problem. I googled about the same problem, but related to jupyter notebooks 500 internal server error, and found your question. I resolved my issue by downgrading tornado to version 5 (sudo -H pip3 install "tornado==5") and everything works again. I hope you find a solution by now or my hint helps you.
I found this script (tutorial) on GitHub (https://github.com/amyoshino/Dash_Tutorial_Series/blob/master/ex4.py) and I am trying to run in my local machine.
Unfortunately I am having and Error
I would really appreciate if anyone can help me to run this script.
Perhaps this is something easy but I am new in coding.
Thank you!
You probably just need to pip install the dash-core-components library!
Take a look at the Dash Installation documentation. It currently recommends running these commands:
pip install dash==0.38.0 # The core dash backend
pip install dash-html-components==0.13.5 # HTML components
pip install dash-core-components==0.43.1 # Supercharged components
pip install dash-table==3.5.0 # Interactive DataTable component (new!)
pip install dash-daq==0.1.0 # DAQ components (newly open-sourced!)
For more info on using pip to install Python packages, see: Installing Packages.
If you have run those commands, and Flask still throws that error, you may be having a path/environment issue, and should provide more info in your question about your Python setup.
Also, just to give you a sense of how to interpret this error message:
It's often easiest to start at the bottom and work your way up.
Here, the bottommost message is a FileNotFound error.
The program is looking for the file in your Python37/lib/site-packages folder. That tells you it's looking for a Python package. That is the directory to which Python packages get installed when you use a tool like pip.
i am integrating paypalrestsdk in my AppEngine project. When, using my local dev_appserver, i try to create a payment on the PayPal sandbox, i have the following error:
SSLCertificateError: Invalid and/or missing SSL certificate for URL: https://api.sandbox.paypal.com/v1/oauth2/token
So, i have tried to provide the correct pem file, downloading it from here and setting up the correct ssl_option attribute:
# Setting up the correct path to the .pem file
cert = os.path.join(ROOT, 'certs/api.sandbox.paypal.com_SHA-2_01132018.pem')
logger.info("Using SSL certificate: %s", cert)
return Api(
mode=get_paypal_environment(), # sandbox or live
client_id=flask.current_app.config["PAYPAL_CLIENT_ID"],
client_secret=flask.current_app.config["PAYPAL_CLIENT_SECRET"],
ssl_options={"cert": cert}
)
Here there is the PayPalRestSDK documentation that gives details on how to provide certificate. I have double checked the path created is correct.
I have have found a bug report here that talks about a similar problem.
Also, i have tried the solution suggested here and still does not work.
On a live instance, on appspot, this all works perfectly.
Here's the relevant part of my requirements.txt:
Flask==0.10.1
itsdangerous==0.24
paramiko==1.15.1
pycrypto==2.6.1
Flask-OAuthlib==0.9.1
google-api-python-client==1.4.0
paypalrestsdk==1.11.1
requests[security]==2.9.1
Is anyone having the same issue ?
OK, I believed I've solved this one, at least in my case, which I'll describe below.
This seemed to be due to two issues:
Issue #1) PayPal is migrating to supporting only TLS 1.2, and has started by switching over the sandbox URLs, with the production URLs to come later. This explains why things are broken only when connecting from the sandbox, and why it used to work but doesn't now. More on this here.
Issue #2) My local install of Python didn't support TLS 1.2. Here is an easy way to check:
$ python
>>> import ssl
>>> print ssl._PROTOCOL_NAMES
If you don't see PROTOCOL_TLSv1_2 listed, this is definitely the issue. In my case, I was using the builtin version on Python on Mac OS X 10.11, which had a pretty old version on OpenSSL built in.
So how to fix it? Well, in my case, this worked pretty well (copied mostly from here):
$ brew update
$ brew install openssl
$ brew link openssl --force
$ brew install python --with-brewed-openssl
$ sudo ln -s /usr/local/Cellar/python/2.7.11/bin/python /usr/local/bin/python
Now if you run the test I listed above, you should see the 1.2 protocol listed.
This should make everything work again, good luck!
We are trying to get the conda install (on windows 8) to work behind a firewall via a proxy server. Currently, we are able to use pip to install packages while on our company network by using this at the command prompt:
pip install pandas --proxy=http://abc.def.xyz.com:1234
No passwords need to be specified, just the proxy server and port. The conda documentation states that proxy servers are possible:
# Proxy settings: http://[username]:[password]#[server]:[port]
proxy_servers:
http: http://user:pass#corp.com:8080
https: https://user:pass#corp.com:8080
I have tried this with various combinations to see if I can get it to work with or without putting in my username and password.
# formats tried:
http: http://user:pass#abc.def.xyz.com:1234
http: http://abc.def.xyz.com:1234
I cannot seem to get it to work. Tried various combinations of quoting things too (passwords have special chars). Also tried with and without the domain\user.
I can see under the hood, conda is using urlib3 (while pip may be using urlib proxy handler?). Note that having your username and password in a file is generally frowned upon.
I know we could set up our own http or file location channel and put all the packages there and add the channel to the .condarc config settings. However I would prefer not to have to manage a repository of packages and versions locally.
So.... is there a way to specify, in the .condarc file the proxy server and port (without user and password) so that conda install works behind a firewall just like pip install on the command line? Or even an inline call like pip has and works... something like:
conda install pandas --proxy=abc.def.xyz.com:1234
Thanks in advance...
PS: I really love conda. I spent last weekend setting up many virtual environments on my home PC. Documentation was great and everything worked flawlessly. Overall, much better than pip... if only we could only get this to work inside our company :)
Well, this is embarrassing, but good news. I solved my problem with one more attempt at a change in the condarc file.
https: https://abc.def.xyz.com:1234
I guess pip worked ok with regular http, while conda's addresses are all https sites:
https://repo.continuum.io/pkgs/free/win-64/
I should have caught that!
Well, I am now just happy that we have a solution to use conda behind our firewall, and without needing a user and password. Awesome!
Late answer but maybe other people faced with this problem can benefit.
Create a .condarc file contaninig :
channels:
- defaults
# Show channel URLs when displaying what is going to be downloaded and
# in 'conda list'. The default is False.
show_channel_urls: True
allow_other_channels: True
proxy_servers:
http: http://172.**.*.***:8080
https: https://172.**.*.***:8080
ssl_verify: False
Change IP adresses with your own proxy settings.
Put this file in your user's main folder (for me : C:\Users\bakayim)
Restart your anaconda prompt
Open Anaconda command and execute below command:
set HTTP_PROXY=http://username:password#proxyurl.com:8080
set HTTPS_PROXY=https://username:password#proxyurl.com:8443
I also set 2 Windows environment variables: (don't know if it was necessary)
Name: http_proxy
Variable: http://username:password#Proxyadresse:Proxyport
Name: https_proxy
Variable: https://username:password#Proxyadresse:Proxyport
what wokred for me was the following .condarc file
channels:
- r
- defaults
proxy_servers:
http: http://username:password#Proxyadresse:Proxyport
https: https://username:password#Proxyadresse:Proxyport
ssl_verify: true
I can confirm that .condarc didn't have desired effect in my case (Windows 7). With conda info I could verify that it was loaded but it didn't have any effect.
I had to set forementioned environment variables in order to get connection from behind a proxy.
I was done as follows in command prompt:
set http_proxy=[protocol:your_proxy_address_here:port]
set https_proxy=[protocol:your_proxy_address_here:port]
Remove brackets. To verify (list) your concurrent settings just type: set
The new version of Anaconda comes with .condar file in the user directory C:\Users\User_name\.condarc.
so all to do is just to edit the content as below:
channels:
- defaults
show_channel_urls: True
allow_other_channels: True
proxy_servers:
http: http://172.**.*.***:8080
https: https://172.**.*.***:8080
ssl_verify: true
That's what worked for me.
I am trying to checkout a subversion repository using PIP, since I am under a proxy I am calling PIP using the --proxy parameter:
pip install svn+http://django-compress.googlecode.com/svn/trunk/ --proxy=myproxy:8080
While PIP itself works fine under the proxy, it seen that its not passing the proxy parameter to the SVN client:
Downloading/unpacking svn+http://django-compress.googlecode.com/svn/trunk/
Checking out http://django-compress.googlecode.com/svn/trunk/ to c:\users\canassa\appdata\local\temp\pip-x_w9ct-build
svn: OPTIONS of 'http://django-compress.googlecode.com/svn/trunk': could not connect to server (http://django-compress.googlecode.com)
Complete output from command "C:\Program Files\SlikSvn\bin\svn.exe" checkout -q http://django-compress.googlecode.com/svn/trunk/ c:\users\canassa\appdata\local\temp\pip-x_w9ct-build:
----------------------------------------
Command "C:\Program Files\SlikSvn\bin\svn.exe" checkout -q http://django-compress.googlecode.com/svn/trunk/ c:\users\canassa\appdata\local\temp\pip-x_w9ct-build failed with error code 1
Storing complete log in C:\Users\canassa\AppData\Roaming\pip\pip.log
To make things worst I am under a Windows environment and using the SilkSVN client. I also have to switch off the proxy a few times every day since its a notebook and I have to connect it with the wireless, which don't uses a proxy.
My question is if there is a way to handle the SlikSvn proxy under PIP and Windows. Preferably making easy to switch it off when I need.
It is an open bug[1] and there is not solution to this problem right now.
If you find an answer, please, comment in pip's issue tracker.
[1] - https://github.com/pypa/pip/issues/227