Ubuntu18.04安装TensorFlow 遇到错误 No such file or directory: ‘c++‘: ‘c++‘

本文介绍了在安装TensorFlow过程中遇到的错误“Nosuchfileordirectory:‘c++’:‘c++’”,并给出了详细的解决方案,包括更新pip版本和安装setuptools等步骤。
部署运行你感兴趣的模型镜像

报错内容如下. 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-v2.15

TensorFlow-v2.15

TensorFlow

TensorFlow 是由Google Brain 团队开发的开源机器学习框架,广泛应用于深度学习研究和生产环境。 它提供了一个灵活的平台,用于构建和训练各种机器学习模型

评论 2
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值