python pip 安装模块包出现的错误
模块psycopg2.8.6,下载地址:https://pypi.org/project/psycopg2/#files
下载文件是:psycopg2-2.8.6-cp36-cp36m-win_amd64.whl
[root@baidu1 opt]# pip3.6 install psycopg2-2.8.6-cp36-cp36m-win_amd64.whl
WARNING: Running pip install with root privileges is generally not a good idea. Try `pip3.6 install --user` instead.
psycopg2-2.8.6-cp36-cp36m-win_amd64.whl is not a supported wheel on this platform.
#解决办法
1、查找支持的python类型和版本
./python3 -m pip debug --verbose
2、修改源文件
-win_amd64修改为linux_x86_64
[root@baidu1 opt]# mv psycopg2-2.8.6-cp36-cp36m-win_amd64.whl psycopg2-2.8.6-cp36-cp36m-linux_x86_64.whl
[root@baidu1 opt]# pip3.6 install psycopg2-2.8.6-cp36-cp36m-linux_x86_64.whl
WARNING: Running pip install with root privileges is generally not a good idea. Try `pip3.6 install --user` instead.
Processing ./psycopg2-2.8.6-cp36-cp36m-linux_x86_64.whl
Installing collected packages: psycopg2
Successfully installed psycopg2-2.8.6
这种方法不推荐使用,可以参考https://blog.csdn.net/w345731923/article/details/111354119文章,在py资源库中没有aarch64,我重命名的方法,最终导致二进制依然无法运行。