Python 3.6:在 Windows 上安装 tensorflow 失败,类型错误:统计:路径应该是字符串、字节、os.PathLike 或整数,而不是 NoneType

bri*_*rij 4 python pip typeerror setup.py tensorflow

我是 Python 和 Tensorflow 的新手。我尝试使用命令 pip install --upgrade tensorflow 安装 tensorflow。但是,安装失败有两点:

  1. wrapt 的构建轮(setup.py)
  2. 为 wrapt 运行 setup.py install

在这两种情况下,错误是相同的

TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType
Run Code Online (Sandbox Code Playgroud)

任何人都可以为这个错误提出一些解决方案吗?

小智 7

我也遇到了同样的失败,尝试过旧的 Python、旧的 TensorFlow,但没有运气。然后发现了这个,它对我有用(我在 Windows 上)。确保您执行以下操作:

set WRAPT_INSTALL_EXTENSIONS=false

在运行之前 pip install tensorflow.

希望这可以帮助!