pip 安装模块报错解决

系统版本 ubuntu  Kylin 16.04 LTS      

报错1:安装pip3 安装 Django 总是提示time out,无法安装。

改用国内源:

 豆瓣源:

sudo pip3 install -i https://pypi.doubanio.com/simple/ 包名(django)

 

还有其他的解决方案,如修改配置文件 [global]块,的超时时间等

 

报错2:

error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

解决办法:

sudo apt-get install python-dev

 

 

报错3:

_mssql.c:266:22: 致命错误:sqlfront.h:没有那个文件或目录
     #include "sqlfront.h"
                          ^
    编译中断。
    error: command 'gcc' failed with exit status 1


解决方法:

安装前尝试下面命令
export PYMSSQL_BUILD_WITH_BUNDLED_FREETDS=1

 

posted @ 2016-12-12 23:43  noube  阅读(594)  评论(0编辑  收藏  举报