在这篇文章中,我们将带领您了解pip安装icu失败:Command"pythonsetup.pyegg_info"failedwitherrorcode1in的全貌,包括pip安装报错的相关情况。同时
在这篇文章中,我们将带领您了解pip安装icu失败:Command "python setup.py egg_info" failed with error code 1 in的全貌,包括pip 安装报错的相关情况。同时,我们还将为您介绍有关 error: command ''gcc'' failed with exit status 1 ,python 安装 pyhs2 失败、centos7 安装 mysqlclient 报错 ERROR: Command errored out with exit status 1: python setup.py egg_info Check、Command "python setup.py egg_info" failed with error code 1、Command "python setup.py egg_info" failed with error code 1 in的知识,以帮助您更好地理解这个主题。
本文目录一览:- pip安装icu失败:Command "python setup.py egg_info" failed with error code 1 in(pip 安装报错)
- error: command ''gcc'' failed with exit status 1 ,python 安装 pyhs2 失败
- centos7 安装 mysqlclient 报错 ERROR: Command errored out with exit status 1: python setup.py egg_info Check
- Command "python setup.py egg_info" failed with error code 1
- Command "python setup.py egg_info" failed with error code 1 in
pip安装icu失败:Command "python setup.py egg_info" failed with error code 1 in(pip 安装报错)
问题
Mac 下通过 pip 安装 icu 失败。
解决办法及原因
问题的原因是因为icu库中的某一行代码找不到一个文件,获取不到ICU_VERSION
的值。
# Install icu
brew install icu4c
# check newest version
ls /usr/local/Cellar/icu4c/
# Edit pyicu installer to work
git clone https://github.com/ovalhub/pyicu.git
# edit setup.py not to query for the version, i.e. change
# ICU_VERSION = subprocess.check_output((''icu-config'', ''--version'')).strip()
# to whatever your version is, e.g.
# ICU_VERSION = ''57''
# Install pyicu
env LDFLAGS=-L/usr/local/opt/icu4c/lib CPPFLAGS=-I/usr/local/opt/icu4c/include DYLD_LIBRARY_PATH=-L/usr/local/opt/icu4c/lib python setup.py build
env LDFLAGS=-L/usr/local/opt/icu4c/lib CPPFLAGS=-I/usr/local/opt/icu4c/include DYLD_LIBRARY_PATH=-L/usr/local/opt/icu4c/lib sudo python setup.py install
# Change DYLD_LIBRARY_PATH (not sure if req''d)
DYLD_LIBRARY_PATH=/usr/local/Cellar/icu4c/57.1/:$DYLD_LIBRARY_PATH
echo $DYLD_LIBRARY_PATH
# Icu works now from python, and you can proceed with polyglot
$ python
>>> import icu
$ pip install polyglot
$ python
>>> import polyglot
参考
- Error installing pip pyicu
本文同步分享在 博客"削微寒的程序员之路"(CNBlog)。
如有侵权,请联系 support@oschina.cn 删除。
本文参与“OSC源创计划”,欢迎正在阅读的你也加入,一起分享。
error: command ''gcc'' failed with exit status 1 ,python 安装 pyhs2 失败
copying sasl/saslwrapper.pyx -> build/lib.linux-x86_64-2.7/sasl
running build_ext
building ''sasl.saslwrapper'' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/sasl
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Isasl -I/root/anaconda2/include/python2.7 -c sasl/saslwrapper.cpp -o build/temp.linux-x86_64-2.7/sasl/saslwrapper.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]
In file included from sasl/saslwrapper.cpp:254:0:
sasl/saslwrapper.h:22:23: fatal error: sasl/sasl.h: No such file or directory
#include <sasl/sasl.h>
^
compilation terminated.
error: command ''gcc'' failed with exit status 1
----------------------------------------
Command "/root/anaconda2/bin/python -u -c "import setuptools, tokenize;__file__=''/tmp/pip-build-DLlXxp/sasl/setup.py'';f=getattr(tokenize, ''open'', open)(__file__);code=f.read().replace(''\r\n'', ''\n'');f.close();exec(compile(code, __file__, ''exec''))" install --record /tmp/pip-n5E30n-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-DLlXxp/sasl/
centos7 安装 mysqlclient 报错 ERROR: Command errored out with exit status 1: python setup.py egg_info Check
报错:ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
- 解决方案
ln -s /usr/local/mysql/bin/mysql_config /usr/local/bin/mysql_config
- 还是报错
yum install mysql-devel
Command "python setup.py egg_info" failed with error code 1
D:\Program Files\python_3_6_4>python -m pip install --upgrade pip
Cache entry deserialization Failed, entry ignored
Collecting pip
Cache entry deserialization Failed, entry ignored
Downloading https://files.pythonhosted.org/packages/a4/6d/6463d49a933f547439d6b5b98b46af8742cc03ae83543e4d7688c2420f8b/pip-21.3.1-py3-none-any.whl (1.7MB)
100% |████████████████████████████████| 1.7MB 299kB/s
Installing collected packages: pip
Found existing installation: pip 9.0.1
Uninstalling pip-9.0.1:
Successfully uninstalled pip-9.0.1
Successfully installed pip-21.3.1
特别注意:
如果安装了多个版本的python
要在正确的位置(目录,文件夹)执行 python -m pip install --upgrade pip
Command "python setup.py egg_info" failed with error code 1 in
使用 docker build -t $docker_name:test1.0 .
建立docker image 出现如下错误:
原因:base image的pip版本过低,在Dockerfile中pip install 命令之前加入以下命令:RUN pip install --upgrade pip
则问题解决:docker镜像创建成功
我们今天的关于pip安装icu失败:Command "python setup.py egg_info" failed with error code 1 in和pip 安装报错的分享就到这里,谢谢您的阅读,如果想了解更多关于 error: command ''gcc'' failed with exit status 1 ,python 安装 pyhs2 失败、centos7 安装 mysqlclient 报错 ERROR: Command errored out with exit status 1: python setup.py egg_info Check、Command "python setup.py egg_info" failed with error code 1、Command "python setup.py egg_info" failed with error code 1 in的相关信息,可以在本站进行搜索。
本文标签: