Get the App
SLTechnology News&Howtos  ›  Development  › 

How to solve the problem that python installs tfx through the new environment

Shulou Source: shulou.com Published: 2022-05-31 16:28:21 10月03日 Update

In this article, the editor introduces in detail "how to solve the problem of python installing tfx through the new environment". The content is detailed, the steps are clear, and the details are handled properly. I hope that this article "python installs tfx through the new environment how to solve the problem" can help you solve your doubts.

Problem: want to install tfx, but the hint does not support python3.9.

Solution: create a new environment tfx dedicated to running the pipeline, which installs python3.8.

1. Check your own python version (jupyter notebook): import syssys.version # View python version

two。 Create a new environment named tfx (Anaconda Prompt)

First take a look at the existing environment:

Conda env list

Create an environment called [tfx]:

Conda create-name tfx python==3.8

Enter y

Created

Code:

# activate environment conda activate tfx# exit environment conda deactivate# delete environment conda remove-n tfx-- all# view environment conda env list3.Anaconda select a new environment

Jupyter needs to be installed

4. Install tfx

Entering the new environment, the python version has become 3.8.

Install tensorflow and tfx:

(when installing tfx, an error indicates that the pywinpty version is too high, so install a lower version of pywinpty first)

Pip install tensorflowpip install pywinpty==1.1.6pip install tfx==1.7.0

View version

Import tensorflow as tfprint ('TensorFlow version: {}' .format (tf.__version__)) from tfx import v1 as tfxprint ('TFX version: {}' .format (tfx.__version__))

After reading this, the article "how to solve the problem of python installing tfx through a new environment" has been introduced. If you want to master the knowledge points of this article, you still need to practice and use it yourself to understand it. If you want to know more about related articles, you are welcome to follow the industry information channel.

Tags: Environment version question article content prompt proper code idea new knowledge plan time more step pipeline activation knowledge knowledge point article Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple Xiaomi Redmi Docker OPPO Reno