解决tensorflow-addons下载问题Could not find a version that satisfies the requirement

由于要用到tensorflow-addons,所以需要安装对应的库。遇到的问题是:

ERROR: Could not find a version that satisfies the requirement
tensorflow-addons (from versions: none) ERROR: No matching
distribution found for tensorflow-addons

请添加图片描述
网上有很多说是pip源的原因,所以我先切换pip源:

pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple/

然而并没有解决问题,在此之前出现同样的错误。
之后继续在网上查找解决之道,终于给试出来啦。用以下代码即可:

pip install tensorflow-addons  -i http://pypi.doubanio.com/simple/ --trusted-host pypi.doubanio.com

不过这样也会有个坑,会自动安装最新版的,可能和电脑上的tensorflow不兼容。所以最好安装自己的tensorflow版本来安装:

主要参考这个网站:
https://blog.csdn.net/weixin_42001089/article/details/84403842

你可能感兴趣的:(AI,python,机器学习,机器学习,人工智能,算法)