Facing issues while installing Tensorflow behind a proxy - installation

I am currently using Python (Version: 3.5.2 |Anaconda 4.2.0 (64-bit)|). While i am trying to install tensorflow , it is throwing an error. I don't understand how to solve. Below is the error:
Collecting tensorflow
Cache entry deserialization failed, entry ignored
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after
connection broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel
connection failed: 407 Proxy Authentication Required',))':
/simple/tensorflow/
Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after
connection broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel
connection failed: 407 Proxy Authentication Required',))':
/simple/tensorflow/
Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after
connection broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel
connection failed: 407 Proxy Authentication Required',))':
/simple/tensorflow/
Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after
connection broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel
connection failed: 407 Proxy Authentication Required',))':
/simple/tensorflow/
Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after
connection broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel
connection failed: 407 Proxy Authentication Required',))':
/simple/tensorflow/
Could not find a version that satisfies the requirement tensorflow (from
versions: )
No matching distribution found for tensorflow
Cache entry deserialization failed, entry ignored
I don't have any internet connection problem. Could anyone please help me regarding this.

To install tensorflow behind a proxy follow the below steps
Step 1: Setting environment variables
HTTP_PROXY = http://user:password#proxy:portnumber
HTTPS_PROXY = https://user:password#proxy:portnumber
Step 2: Setting proxy servers in .condarc file.
In ".condarc" file which will be in /Users/username/.condarc, add the below lines
proxy_servers:
http: http://user:password#proxy:portnumber
https: https://user:password#proxy:portnumber
Step 3: Install through Anaconda (conda prompt)
Method 1:
Open conda prompt, create new environment for installation through the below commands
conda create -n tensorflow
activate tensorflow
conda install jupyter
conda install scipy
conda install tensorflow
Method 2:
Download the below listed files:
tensorflow jar with name win-64/tensorflow-1.3.0-py36_0.tar.bz2 from link
protobuf jar with name win-64/protobuf-3.2.0-py36_0.tar.bz2 from link
repodata.json.bz2 from link
Now in conda prompt, move to the downloaded directory and give these commands
conda install tensorflow-1.3.0-py36_0.tar.bz2
conda install protobuf-3.2.0-py36_0.tar.bz2
Now you are all set either by method 1 or method 2.
To check the installation from conda prompt itself, give these commands
python ####this will open python workspace from conda
import tensorflow as tf ####if running this didnt gave any error u r all set
NOTE:
If any of the conda commands didn't work(as you are under proxy), give these commands:
conda config --set ssl_verify no
set NO_PROXY=continuum.io,anaconda.org
Hope this helps :)

Related

Problem to install something on raspberry pi (vs code) (apt and pip not working)

I have connected to my raspberry pi via vs code. I wanted to install flask, but from this time I have connected to my raspy via vs code, terminal giving me following error: 'WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fa140c730>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/flask/
I also tried to do the same by restarting my raspi and connect directly with my local machines terminal and pip install flask, but again the same issue. Connection to the internet exists, I can ping for example google with my raspi.
I read in stack overflow something about needed proxy configurations but I never did it before and I am also not using any proxies, what is confusing me. Has somebody an idea how to solve it?

Can not able to install PyInstaller on cloud machine (Persistance VDI)

I am trying to install pyinstaller on my windows (windows 10) machine, I have VDI on cloud, I have installed Anaconda Navigator and inside that installed Python Version 3.6.3.
But when I tried to install the pyinstaller library using Anaconda Prompt and CMD, it is throwing some error regarding "NewConnectionError" and "No matching distribution found for pyinstaller".
I have also tried with .whl file.
pip install <whl-filename>
One of the solution mentioned using Proxy IP (server) able to install, but that solution also won't work.
I have searched on google and tried to find some solution but did not get success, also I've tried with specific version of pyinstaller.
You can see below error report.
pip install pyinstaller
Collecting pyinstaller
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x0000025F6522D860>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed',)': /simple/pyinstaller/
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x0000025F6522D5F8>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed',)': /simple/pyinstaller/
Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x0000025F6522D7B8>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed',)': /simple/pyinstaller/
Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x0000025F6522D828>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed',)': /simple/pyinstaller/
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x0000025F6522D470>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed',)': /simple/pyinstaller/
Could not find a version that satisfies the requirement pyinstaller (from versions: )
No matching distribution found for pyinstaller
pyinstaller install failed:
keyring install failed:
I thought there is some restriction for package site, but I can able to open "https://pypi.org/project/pyinstaller/" site in browser as well, no any restriction I found.
Same issue while fetching the keyring library.
Extra:
VDI = "Virtual desktop infrastructure" is a technology that refers to the use of virtual machines to provide and manage virtual desktops.
While VDI allows access to a remote desktop on which users can work, VPN establishes a tunnel between the end-user and an organization's private network.

Unable to install mariadb on macOs

I'm trying to install mariadb on macOs Big Sur(version 11.2.3) with m1 chip. Tried the following official link here and here, but when i run the command
brew install mariadb
then after some time it gives me this error
curl: (7) Failed to connect to pkg-containers.githubusercontent.com port 443: Operation timed out
Error: mariadb: Failed to download resource "mecab"
Download failed: https://ghcr.io/v2/homebrew/core/mecab/blobs/sha256:495c42533a5ea5bdedcf4a95c05e613c3579f626b17d0df0396d8a0ea9328bbe
Any help would be appreciated!.
It is a probably a problem with my connection. Please see more details here

Using proxy in non-browser applications

My college uses a proxy server to provide internet. I am able to access internet on the browser very well and apps like Skype are automatically connected when I login into my browser.
But some apps show error in connecting.
In Windows Store (of Windows10) I am able to open the store but while downloading it shows an error code of 0x800704CF.
Also I am not able to access the internet in the terminal of my virtual machine - Ubuntu 16.04.2 LTS (I am able to access it in its browser). I get following errors:
While trying
sudo apt-get update
I get the error
Err:1 http://us.archive.ubuntu.com/ubuntu xenial InRelease
Cannot initiate the connection to us.archive.ubuntu.com:80
(2001:67c:1562::19). - connect (101: Network is unreachable) [IP:
2001:67c:1562::19 80]
And while trying
python get-pip.py
(after downloading get-pip.py)(to install pip)
I get the error:
Retrying (Retry(total=4, connect=None, read=None, redirect=None))
after connection broken by
'NewConnectionErro ('<pip._vendor.requests.packages.urllib3.connection.VerifiedH
TTPS Connection object at 0x7f7451ef1f10>: Failed to establish a new
connection: [Errno 101] Network is unreachable',)': /simple/pip/
I have tried to apply the proxy settings on terminal (in Linux) as:
export http_proxy={proxy IP they provided}
but it did not work.
For apt you have to provide Configuration
proxy conf for apt
For pip you can use command line arguments
pip install --proxy user:password#proxyserver:port <package>

Creating Python 3.4 Environment in Anaconda

I have Python 2.7 Anaconda 64 bit on Windows 7.
I want to create a Python 3.4 environment. So at the command I typed:
conda create -n py34 python=3.4 anaconda
I get the following problems
Fetching package metadata: Could not connect to https://repo.continuum.io/pkgs/pro/noarch/
.Could not connect to https://repo.continuum.io/pkgs/pro/win-64/
.Could not connect to https://repo.continuum.io/pkgs/free/noarch/
.Could not connect to https://repo.continuum.io/pkgs/free/win-64/
it then runs through all the packages and gives another error:
Could not connect to https://repo.continuum.io/pkgs/free/win-64/menuinst-1.0.4-py34_0.tar.bz2
Error: Connection error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590): https://repo.continuum.io/pkgs/fre
e/win-64/menuinst-1.0.4-py34_0.tar.bz2
Then of course when I type
activate py34
I get:
No environment named "py34" exists in C:\Users\martbar\AppData\Local\Continuum\Anaconda\envs
any ideas what could be the issue? I am on a corporate PC but when I looked at the firewall on my PC it said it was off.
The underlying connection to https://repo.continuum.io is not passing a certificate verification test. You can go there in your browser to see if your OS may be missing this certificate. If so, then run Windows Update and look for a "Update for Root Certificates for Windows 7" entry that you can install.

Resources