报错内容如下. No such file or directory: ‘c++’: ‘c++’
Collecting grpcio>=1.8.6 (from tensorflow==1.11.0)
Using cached https://files.pythonhosted.org/packages/8c/34/7dafc9052bd9b2b41c5a8912aeeca01e179d16de17e9c275633d4b807330/grpcio-1.38.0.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-09xp2toh/grpcio/setup.py", line 255, in <module>
if check_linker_need_libatomic():
File "/tmp/pip-build-09xp2toh/grpcio/setup.py", line 205, in check_linker_need_libatomic
stderr=PIPE)
File "/usr/lib/python3.6/subprocess.py", line 729, in __init__
restore_signals, start_new_session)
File "/usr/lib/python3.6/subprocess.py", line 1364, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'c++': 'c++'
后经过百度, 得知是pip版本太低了. 需要更新. 然后还缺少setuptools
执行下面的命令即可
$ pip3 install --upgrade pip
$ python3 -m pip install --upgrade setuptools
# 最后再执行就可以了
$ pip3 install tensorflow==1.11.0
本文介绍了在安装TensorFlow过程中遇到的错误“Nosuchfileordirectory:‘c++’:‘c++’”,并给出了详细的解决方案,包括更新pip版本和安装setuptools等步骤。
2350





