报错如下:
ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: '.../lib/python3.7/site-packages/importlib_metadata-6.7.0.dist-info/METADATA'
安装到网上找importlib_metadata-6.7.0的whl文件,离线安装,我是在piwheels找的。结果报错不变,然后参考了csdn博客,将importlib_metadata相关文件夹全删了再重装whl,解决了。
操作如下:
rm -r /home/dl/anaconda3/envs/xx/lib/python3.7/site-packages/importlib_metadata-6.7.0.dist-info
rm -r /home/dl/anaconda3/envs/xx/lib/python3.7/site-packages/importlib_metadata-4.2.0.dist-info/
rm -r /home/dl/anaconda3/envs/xx/lib/python3.7/site-packages/importlib_metadata/
pip install importlib_metadata-6.7.0-py3-none-any.whl