A lot of people say this is because of the CUDA version, but I’ve found that another reason is the Python version of TensorFlow. If you look at the picture, TensorFlow at this point is Python 2.7.
So when I’m using Python 2.7, I don’t get anything wrong
I got an error when I imported TensorFlow in Python 3.6
Use the Conda List to see the Python version
I found that the default version of Python is 2.7. I created this virtual environment with 3.6, but for some reason it changed to 2.7.
The solution. Re-create the Conda environment and re-install TensorFlow.
conda create --name tensorflow python=3.6 conda install tensorflow conda install tensorflow-gpu conda list
Once installed, you will notice that TensorFlow is now Python 3.6.
Look at the default Python version
Is 3.6. The TensorFlow version corresponds to the Python version, so it should work fine.
As for why the Python version of the Anaconda virtual environment changed, I’m not sure.
- [Solved] Import cv2 Error: ImportError: libGL.so.1: cannot open shared object file: No such file or directory
- Tensorflow import Error: ImportError: libcuda.so.1: cannot open shared object file: No such file or dire
- PIP Install Mysqlclient error C1083: Cannot open include file: ‘mysql.h‘: No such file or directory
- OSError libespeak.so.1 error: no such file or directory [How to Solve]
- [Solved] Python project runs the open() function error: FileNotFoundError: [Errno 2] No such file or directory
- Python environment error, bad interpreter: there is no file or directory
- Python FileNotFoundError: [Errno 2] No such file or directory: ‘objects/epsilon.pkl
- fatal error: cublas_v2.h: No such file or directory [How to Solve]
- [Solved] ROS fatal error: NvInferRuntimeCommon. h: No such file or directory
- The solution of no such file or directory and cannot load native module running error of python3 pyinstaller after packaging
- [Solved] Mac ffmpeg Install Error: filenotfounderror: [errno 2] no such file or directory: ‘ffmpeg’: ‘ffmpeg’
- Raspberry pie compilation and installation opencv error: fatal error: bootdesc_bgm.i: No such file or directory
- cffi Security Report “c / _cffi_backend.oc / _cffi_backend.c: 15:17: error: ffi.h: No such file or directory” Problem
- [Solved] Cannot open .xlsx file, xlrd.biffh.XLRDError: Excel xlsx file; not supported
- Python writes DICOM file (attributeerror: ‘filemetadataset’ object has no attribute ‘transfersyntax uid’ solution)
- Python openpyxl excel open zipfile error resolution: zipfile.BadZipFile: File is not a zip file
- [Solved] Python Read bam File Error: &&OSError: no BGZF EOF marker； file may be truncated
- Error reading file by pandas pandas.errors.EmptyDataError: no columns to parse from file
- [How to Solve] ImportError: No module named typing
- Python Error: mongod: error while loading shared libraries: libcrypto.so.1.1