Tensorflow lead pack problem

Problem Description: linux environment, the user can use in the pi import tensorflow

You can not be used in the root user import tensorflow

 

Reason: python3 folder, can not find the path sys

import sys

sys.path

Output:

 

-------- roughly this path.

 

There are two ways to increase incoming packet Tensorflow:

1. Temporary Import

import sys

sys.path

sys.path.append ( 'absolute pathname')

2. permanent import

In python3.7 / dist-packages sys.path output path, .pth new file, the file path of the file into the

cd /usr/lib/python3.7/dist-packages

touch mypypath.pth

vim mypypath.pth

/home/ghz/caffe/python/

Save and exit

 

After the test

import tensorflow

https://blog.csdn.net/CAU_Ayao/article/details/88550901

 

 

 

 

 

 

 

 

Released nine original articles · won praise 2 · Views 970

Guess you like

Origin blog.csdn.net/qq_34072169/article/details/103979299