1、安装tensorflow-gpu报错:ERROR: Cannot uninstall 'wrapt'.
ERROR: Cannot uninstall 'wrapt'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
处理:
pip install wrapt --ignore-installed -i https://pypi.tuna.tsinghua.edu.cn/simple/
2、报错:grpcio版本过低
tensorboard 2.4.0 requires grpcio>=1.24.3, but you'll have grpcio 1.12.0 which is incompatible.
处理:
pip install --upgrade grpcio -i https://pypi.tuna.tsinghua.edu.cn/simple/
3、报错:
ERROR: After October 2020 you may experience errors when installing or updating packages. This is because pip will change the way that it resolves dependency conflicts.
We recommend you use --use-feature=2020-resolver to test your packages with the new resolver before it becomes the default.
处理:
pip install python-openstackclient python-glanceclient python-neutronclient --use-feature=2020-resolver -i https://pypi.tuna.tsinghua.edu.cn/simple/
4、在执行上步时报错
ERROR: Cannot uninstall 'PyYAML'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
处理:
pip install PyYAML --ignore-installed -i https://pypi.tuna.tsinghua.edu.cn/simple/
5、执行import tensorflow as tf报错:
ImportError: Something is wrong with the numpy installation. While importing we
detected an older version of numpy in ['/home/z/anaconda3/lib/python3.6/site-
packages/numpy']. One method of fixing this is to repeatedly uninstall numpy until
none is found, then reinstall this version.
处理:(1)因为装了多个版本的numpy,执行pip uninstall numpy,直到全部卸载完成
z@z-GL753VD:~$ pip uninstall numpy
Found existing installation: numpy 1.19.4
Uninstalling numpy-1.19.4:
Would remove:
/home/z/anaconda3/bin/f2py
/home/z/anaconda3/bin/f2py3
/home/z/anaconda3/bin/f2py3.6
/home/z/anaconda3/lib/python3.6/site-packages/numpy-1.19.4.dist-info/*
/home/z/anaconda3/lib/python3.6/site-packages/numpy.libs/libgfortran-2e0d59d6.so.5.0.0
/home/z/anaconda3/lib/python3.6/site-packages/numpy.libs/libopenblasp-r0-ae94cfde.3.9.dev.so
/home/z/anaconda3/lib/python3.6/site-packages/numpy.libs/libquadmath-2d0c479f.so.0.0.0
/home/z/anaconda3/lib/python3.6/site-packages/numpy.libs/libz-eb09ad1d.so.1.2.3
/home/z/anaconda3/lib/python3.6/site-packages/numpy/*
Would not remove (might be manually added):
/home/z/anaconda3/lib/python3.6/site-packages/numpy/_import_tools.py
/home/z/anaconda3/lib/python3.6/site-packages/numpy/_mklinit.cpython-36m-x86_64-linux-gnu.so
/home/z/anaconda3/lib/python3.6/site-packages/numpy/add_newdocs.py
/home/z/anaconda3/lib/python3.6/site-packages/numpy/core/_dummy.cpython-36m-x86_64-linux-gnu.so
/home/z/anaconda3/lib/python3.6/site-packages/numpy/core/info.py
/home/z/anaconda3/lib/python3.6/site-packages/numpy/core/multiarray.cpython-36m-x86_64-linux-gnu.so
/home/z/anaconda3/lib/python3.6/site-packages/numpy/core/multiarray_tests.cpython-36m-x86_64-linux-gnu.so
/home/z/anaconda3/lib/python3.6/site-packages/numpy/core/operand_flag_tests.cpython-36m-x86_64-linux-gnu.so
/home/z/anaconda3/lib/python3.6/site-packages/numpy/core/struct_ufunc_test.cpython-36m-x86_64-linux-gnu.so
/home/z/anaconda3/lib/python3.6/site-packages/numpy/core/test_rational.cpython-36m-x86_64-linux-gnu.so
/home/z/anaconda3/lib/python3.6/site-packages/numpy/core/umath.cpython-36m-x86_64-linux-gnu.so
/home/z/anaconda3/lib/python3.6/site-packages/numpy/core/umath_tests.cpython-36m-x86_64-linux-gnu.so
/home/z/anaconda3/lib/python3.6/site-packages/numpy/distutils/__version__.py
/home/z/anaconda3/lib/python3.6/site-packages/numpy/distutils/environment.py
/home/z/anaconda3/lib/python3.6/site-packages/numpy/distutils/info.py
/home/z/anaconda3/lib/python3.6/site-packages/numpy/distutils/site.cfg
/home/z/anaconda3/lib/python3.6/site-packages/numpy/f2py/info.py
/home/z/anaconda3/lib/python3.6/site-packages/numpy/fft/fftpack.py
/home/z/anaconda3/lib/python3.6/site-packages/numpy/fft/fftpack_lite.cpython-36m-x86_64-linux-gnu.so
/home/z/anaconda3/lib/python3.6/site-packages/numpy/fft/info.py
/home/z/anaconda3/lib/python3.6/site-packages/numpy/fft/tests/test_fft.py
/home/z/anaconda3/lib/python3.6/site-packages/numpy/fft/tests/test_fftpack.py
/home/z/anaconda3/lib/python3.6/site-packages/numpy/lib/info.py
/home/z/anaconda3/lib/python3.6/site-packages/numpy/linalg/info.py
/home/z/anaconda3/lib/python3.6/site-packages/numpy/ma/version.py
/home/z/anaconda3/lib/python3.6/site-packages/numpy/random/info.py
/home/z/anaconda3/lib/python3.6/site-packages/numpy/random/randomkit.h
/home/z/anaconda3/lib/python3.6/site-packages/numpy/testing/decorators.py
/home/z/anaconda3/lib/python3.6/site-packages/numpy/testing/nose_tools/__init__.py
/home/z/anaconda3/lib/python3.6/site-packages/numpy/testing/nose_tools/decorators.py
/home/z/anaconda3/lib/python3.6/site-packages/numpy/testing/nose_tools/noseclasses.py
/home/z/anaconda3/lib/python3.6/site-packages/numpy/testing/nose_tools/nosetester.py
/home/z/anaconda3/lib/python3.6/site-packages/numpy/testing/nose_tools/parameterized.py
/home/z/anaconda3/lib/python3.6/site-packages/numpy/testing/nose_tools/utils.py
/home/z/anaconda3/lib/python3.6/site-packages/numpy/testing/noseclasses.py
/home/z/anaconda3/lib/python3.6/site-packages/numpy/testing/nosetester.py
Proceed (y/n)? y
Successfully uninstalled numpy-1.19.4
z@z-GL753VD:~$ pip uninstall numpy
Found existing installation: numpy 1.14.0
Uninstalling numpy-1.14.0:
Would remove:
/home/z/anaconda3/lib/python3.6/site-packages/numpy
/home/z/anaconda3/lib/python3.6/site-packages/numpy-1.14.0-py3.6.egg-info
Proceed (y/n)? y
Successfully uninstalled numpy-1.14.0
z@z-GL753VD:~$ pip uninstall numpy
WARNING: Skipping numpy as it is not installed.
(2)重新安装numpy
pip install numpy -i https://pypi.tuna.tsinghua.edu.cn/simple/