首先安装mutagen:

pip install mutagen 时会报如下错误:

ERROR: Could not install packages due to an EnvironmentError: HTTPSConnectionPool(host=’files.pythonhosted.org’, port=443): Max retries exceeded with url: /packages/30/4c/5ad1a6e1ccbcfaf6462db727989c302d9d721beedd9b09c11e6f0c7065b0/mutagen-1.42.0.tar.gz (Caused by SSLError(SSLError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852)’),))

解决办法: 加入信任, 可加入多个:

pip –trusted-host pypi.python.org –trusted-host pypi.org install –trusted-host files.pythonhosted.org mutagen

安装fdfs_client-py, 源码安装, 首先下载源码:

安装时会报如下错误:

fdfs_client/sendfilemodule.c:43:20: fatal error: Python.h: No such file or directory
#include <Python.h>
^
compilation terminated.
error: command ‘gcc’ failed with exit status 1

原因: python-dev 不一致会出现这样的问题,改成相应的版本就好了

解决办法:

安装合适版本:

再次安装fdfs_client-py, 成功.

安装完以后, 加载模块会报以下错误:

from fdfs_client.client import *
—————————————————————————
ModuleNotFoundError

解决方式:

vim /root/.virtualenvs/env_py3/lib/python3.6/site-packages/fdfs_client_py-1.2.6-py3.6-linux-x86_64.egg/fdfs_client/storage_client.py

注释掉以下行:

完毕以后, 注意得重新开个终端, 才会生效.

Categories: 未分类

0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *