Ad
Install Tensorflow In Virtual Environment Python 2.7
Please, how can i install Tensorflow in a virtual environment? I have used these commands but it doesn't work..
sudo -H pip3 install tensorflow --proxy https://XXX.XX.XX.X:3128
sudo -E pip3 install tensorflow --proxy https://XXX.XX.XX.X:3128
sudo -E pip install tensorflow --proxy https://XXX.XX.XX.X:3128
sudo -H pip install tensorflow --proxy https://XXX.XX.XX.X:3128
sudo pip install tensorflow --proxy https://XXX.XX.XX.X:3128
It resulted in:
Downloading/unpacking tensorflow
Cannot fetch index base URL https://pypi.python.org/simple/
These are my python and pip versions:
(venv)[email protected]:~/tensorflow# pip -V
pip 8.1.2 from /usr/local/lib/python2.7/dist-packages/pip-8.1.2-py2.7.egg
(python 2.7)
(venv)[email protected]:~/tensorflow# python -V
Python 2.7.6
After I tried pip install -U tensorflow
, I got the following result:
Cannot uninstall 'six'
Then I tried pip install -U tensorflow --ignore-installed six
, and with the tf version check I got:
(venv)[email protected]:~/tensorflow# python -c "import tensorflow as tf; print(tf.__version__)"
Illegal instruction (core dumped) (venv)[email protected]:~/tensorflow#
Is there another way to download and install Tensorflow?
Ad
Answer
Please make sure that your pip version is up to date with:
pip install -U pip
Then, as per the comments and edited question, execute:
pip install -U tensorflow==1.5.0 --ignore-installed six
This will ignore the six
related error and the slightly downgraded tensorflow package will install and be useable without the Illegal Instruction error.
To check if the installation was successfull, execute:
python -c "import tensorflow as tf; print(tf.__version__)"
Ad
source: stackoverflow.com
Related Questions
- → What are the pluses/minuses of different ways to configure GPIOs on the Beaglebone Black?
- → Django, code inside <script> tag doesn't work in a template
- → React - Django webpack config with dynamic 'output'
- → GAE Python app - Does URL matter for SEO?
- → Put a Rendered Django Template in Json along with some other items
- → session disappears when request is sent from fetch
- → Python Shopify API output formatted datetime string in django template
- → Can't turn off Javascript using Selenium
- → WebDriver click() vs JavaScript click()
- → Shopify app: adding a new shipping address via webhook
- → Shopify + Python library: how to create new shipping address
- → shopify python api: how do add new assets to published theme?
- → Access 'HTTP_X_SHOPIFY_SHOP_API_CALL_LIMIT' with Python Shopify Module
Ad