安装Hachoirmetadata |命令“python”时出错设置.pyegg\u info“失败,错误代码1出现在…\hachoirmetd中

2024-05-23 17:50:27 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在安装参考文献[3]中的hachoir元数据。我已完成以下hachoir元数据的安装:

conda create -n hachoir-metadata pip python=3.5 
activate hachoir-metadat
pip install --upgrade hachoir-metadata

我使用的软件版本如下:

Python 3.5.5版 水蟒:3.6.5

我收到一个错误,说明命令“python设置.pyegg_info“失败,错误代码1出现在…\hachoir metda中,如下所示。 Anaconda Command Prompt

为了解决问题,我已完成以下操作:

1)安装的安装工具

^{pr2}$

2)安装ipykernel

conda create -n ipykernel pip python=3.5 

activate ipykernel

pip install --upgrade ipykernel

不是上述工作。 首先,在分析错误时,这是由于语法问题。因此,错误是否是由于Python版本不兼容(即hachoir元数据使用Python的旧版本,但这不应该是正确的)?在

如何解决这个问题?在

1https://github.com/facebook/prophet/issues/418

[2]http://ipython.readthedocs.io/en/stable/install/kernel_install.html

[3]https://pypi.org/project/hachoir-metadata/#description


Tags: installpip数据版本软件错误create参考文献
1条回答
网友
1楼 · 发布于 2024-05-23 17:50:27

所以这就是我发现的(注意:我是python新手),hachoir元数据可以与python2一起工作,而不能与python3+一起工作。在

有几个选项可以解决这个问题:

1)对于纯Python,将2.x代码转换为3.x代码通常是一种简单的机械转换。有一个叫做2to3的程序。在

 Step 1) open command prompt and open that folder in command prompt then 
 type python C:/Python35/Tools/Scripts/2to3.py -w yourfile name [1]

2)您也可以将代码从python2移植到python3[2]

3)我还发现,Hachoir3是为python3.3+编写的,它使用了语法中新的yield

我们真幸运!我想我会选择3。在

[1]https://docs.python.org/3.0/library/2to3.html

[2]https://docs.python.org/3/howto/pyporting.html

[3]http://pydoc.net/hachoir3/3.0a2/

[4]https://docs.python.org/3/howto/cporting.html#cporting-howto

相关问题 更多 >