I am trying to install TensorFlow on Windows using Anaconda, behind a firewall.
None of the attempts
pip install tensorflow --trusted-host pypi.python.org
conda create -n tensorflow pip python=3.6
activate tensorflow
pip install --ignore-installed --upgrade tensorflow
pip install tensorflow --no-cache-dir
let me install tensorflow using Anaconda on Windows.
The problem has to do with access permissions
> pip -v install tensorflow
...
* https://pypi.python.org/simple/tensorflow/
...
Starting new HTTPS connection (1): pypi.python.org
...
'NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at ..>:
Failed to establish a new connection:
[WinError 10061] No connection could be made because the target
machine actively refused it',)': /simple/tensorflow/
...
Weirdly, I can download the whl file just fine, but afterwards
pip -v install tensorflow-1.10.0-cp36-cp36m-win_amd64.whl
Processing c:\...\tensorflow-1.10.0-cp36-cp36m-win_amd64.whl
tells me that
Collecting grpcio>=1.8.6 (from tensorflow==1.10.0)
1 location(s) to search for versions of grpcio:
* https://pypi.python.org/simple/grpcio/
So I figure I'll install the recursively needed packages manually, starting with grpcio, but neither the most recent
pip -v install grpcio-1.14.1-cp36-cp36m-win32.whl
pip.exceptions.InstallationError: grpcio-1.14.1-cp36-cp36m-win32.whl is not a supported wheel on this platform.
nor the oldest possible needed by this version of tensorflow
pip -v install grpcio-1.8.6-cp36-cp36m-win32.whl
pip.exceptions.InstallationError: grpcio-1.8.6-cp36-cp36m-win32.whl is not a supported wheel on this platform.
will install.
I am able to download from https://pypi.org/simple/*
just fine. How do I use the downloaded packages to install tensorflow?
Conda 4.3.27
Python 3.6.2
Windows 7 Pro
Update 1
After the first steps of the recipe
- Download tensorflow-1.10.0-cp36-cp36m-win_amd64.whl from pypi.org/simple
- Put the whl file in c:/Users/vrok/.conda/envs
activate c:/Users/vrok/.conda/envs/
the fourth
conda install tensorflow-1.10.0-cp36-cp36m-win_amd64.whl
fails with
CondaHTTPError: HTTP 000 CONNECTION FAILED for url
<https://repo.continuum.io/pkgs/main/win-64/repodata.json.bz2>
even though I am able to download https://repo.continuum.io/pkgs/main/win-64/repodata.json.bz2
manually.
Update 2:
I'm not tied to Anaconda. Any option on Windows is good. PyCharm, IIUC, hooks on to a prior installation. It does not provide python/pip/venvs itself. Still, in Settings \ Project \ Project Interpreter, the user is not told which URL was unreachable. Knowing this would enable those behind firewalls to open, or request opening, access to specific URLs.
Related: