简体   繁体   中英

Unable to install TensorFlow in Python Virtual Environment

Salutations!

I am getting an error when attempting to install TensorFlow in a Python virtualenv. I created a Python 3.7 virtual environment for a data project that I'm working on. I tried installing TensorFlow into that environment and I received the following error:

ERROR: Could not install packages due to an EnvironmentError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Max retries exceeded with url: /packages/34/d5/ce8c17971067c0184c9045112b755be5461d5ce5253ef65a367e1298d7c5/tensorflow-2.1.0-cp37-cp37m-win_amd64.whl (Caused by ProtocolError('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None)))

I'm guessing this may be due to me being on a work network, which may have firewall restrictions, but I am not totally sure.

Any insight would be greatly appreciated.

Gratitude!

You can try either the command,

pip install --trusted-host=pypi.python.org --trusted-host=pypi.org --trusted-host=files.pythonhosted.org --upgrade tensorflow

or the Command,

pip install --trusted-host=pypi.python.org --trusted-host=pypi.org --trusted-host=files.pythonhosted.org --upgrade --proxy=127.0.0.1:3128 tensorflow

For more information, please refer this Github Issue and this Stack Overflow Issue .

Hope this helps. Happy Learning for Tensorflow .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM