win10 安装tensorflow 报错“ERROR: Failed building wheel for wrapt”解决办法

今天打算在win10下安装cuda和tensorflow-gpu, 用pip install tensorflow-gpu安装时出现以下错误:

C:\WINDOWS\system32>pip install tensorflow-gpu
Collecting tensorflow-gpu
Using cached
。。。。。。。。。。。。。。。。。。。。
Building wheels for collected packages: wrapt
Building wheel for wrapt (setup.py) … error
ERROR: Command errored out with exit status 1:

。。。。。。。。。。。。。。。。。。。。
TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType
----------------------------------------

ERROR: Failed building wheel for wrapt
Running setup.py clean for wrapt
Failed to build wrapt
Installing collected packages: wrapt, tensorflow-gpu
Running setup.py install for wrapt … error
ERROR: Command errored out with exit status 1:

。。。。。。。。。。。。。。。。。。。。。。。。
TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType
----------------------------------------
ERROR: Command errored out with exit status 1:

解决办法:
1、下载对应python版本的wraptxxx.whl:https://www.lfd.uci.edu/~gohlke/pythonlibs/#wrapt
2、安装: pip install 刚刚下载whl文件绝对路径
3、然后再重新安装tensorflow,成功。

你可能感兴趣的:(Linux)