Python pip install出现报ASCII码错误解决办法
2017-09-05 09:47
603 查看
在用pip安装Pyhton中sklearn包的过程中出现了UnicodeEncodeError,感觉是路径中存在中文问题,于是上网搜了一番发现真的是pip在安装Python包会加载我的用户的目录,而我的用户的目录恰好是中文的。
大神们给出的解决方法是:
python目录 Python27\Lib\site-packages 建一个文件sitecustomize.py
内容写:
import sys
sys.setdefaultencoding('gb2312')
python会自动运行这个文件。
之后重启cmd,再次运行pip install -U scikit-learn,发现问题完美解决。
大神们给出的解决方法是:
python目录 Python27\Lib\site-packages 建一个文件sitecustomize.py
内容写:
import sys
sys.setdefaultencoding('gb2312')
python会自动运行这个文件。
之后重启cmd,再次运行pip install -U scikit-learn,发现问题完美解决。
相关文章推荐
- 【Python】使用pip install时出现UnicodeDecodeError错误解决方法
- 【Python】使用pip install时出现UnicodeDecodeError错误解决方法
- python3.x+windows下pip install 出现unable to find vcvasall.bat 的解决办法
- pip instal MySQL-python 出现错误解决办法
- python中尝试pip install PIL,出现错误的解决方法
- python2.7,Ubuntu14.04环境下pip安装插件,cffi插件出现一下错误解决办法。
- 使用Genymotion调试出现错误INSTALL_FAILED_CPU_ABI_INCOMPATIBLE解决办法
- 关于Python打开IDLE出现错误的解决办法
- 使用Genymotion调试出现错误INSTALL_FAILED_CPU_ABI_INCOMPATIBLE解决办法
- 使用Genymotion调试出现错误INSTALL_FAILED_CPU_ABI_INCOMPATIBLE解决办法
- python pip3 install 因权限问题失败的解决办法
- Android安装应用程序出现“INSTALL_FAILED_CONTAINER_ERROR”错误的解决办法 .
- 使用Genymotion调试出现错误INSTALL_FAILED_CPU_ABI_INCOMPATIBLE解决办法
- MAC pip install 权限错误解决办法.md
- 使用Genymotion调试出现错误INSTALL_FAILED_CPU_ABI_INCOMPATIBLE解决办法
- 使用Genymotion安装APK出现错误INSTALL_FAILED_CPU_ABI_INCOMPATIBLE的解决办法
- 使用Genymotion调试出现错误INSTALL_FAILED_CPU_ABI_INCOMPATIBLE解决办法
- pip install 安装出现问题:UnicodeEncodeError: 'ascii' codec can't encode characters in position XX的解决办法
- Android安装应用程序出现“INSTALL_FAILED_CONTAINER_ERROR”错误的解决办法
- 使用Genymotion调试出现错误INSTALL_FAILED_CPU_ABI_INCOMPATIBLE解决办法