Install tf1.0 and tf1.5 in Anaconda environment --- py2.7

Source: Internet
Author: User

Install tf1.0 and tf1.5 in Anaconda environment --- py2.7

@ Wp20181030

Environment: ubuntu18.04, anaconda2. In ubuntu, python2.7.15 (default) and python3.6.5 are installed in advance ,.....

Here, we useAnaconda 2(Install it on your own ).Py2.7 and py3.5Environment,InstallTf1.0 and tf1.5, As follows:

Scenario 1: Install tf1.0 in py2.7.

# (1) create a test_py2 Environment [py2 + tf1.0]
Conda create-n <environment name, such as test_py2> Python = 2.7
# (2) activate the test_py2 environment for later use
Source activate test_py2
# Install TF
PIP install -- upgrade-installed tensorflow = 1.0
# Verify whether TF is successfully installed
$ Python
>>> Import tensorflow as TF
>>> TF. _ version __

>>> TF. _ path __
# Uninstall TF
PIP uninstall tensorflow
# (3) Exit the test_py2 Environment
Source deactivate test_py2
# (4) uninstall the test_py2 environment as needed
Conda remove-N test_py2 -- all

Scenario 2:Install tf1.5 in py3.5.
# (1) create a test_py3 Environment [py3 + tf1.5]
Conda create-n <environment name, such as test_py2> Python = 3.5
# (2) activate the environment for later use
Source activate test_py3
# Install TF
PIP install -- ignore-installed -- upgrade tensorflow-1.5.0-cp35-cp35m-manylinux1_x86_64.whl # manual download on the official website, TF and Py should match https://pypi.org/project/tensorflow/1.5.0/#files # The Python version corresponding to the downloaded tensorflow must match Conda create-N tensorflow Python = x. the version of X is the same.
# Verify whether TF is successfully installed
$ Python
>>> Import tensorflow as TF
>>> TF. _ version __
# Uninstall TF
PIP uninstall tensorflow
# (3) Exit the environment
Source deactivate test_py3
# (4) uninstall the environment as needed
Conda remove-N test_py3 -- all


Install tf1.0 and tf1.5 in Anaconda environment --- py2.7

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.