“pip install models”-“python setup.py egg_info”失败,错误代码为 1

Posted

技术标签:

【中文标题】“pip install models”-“python setup.py egg_info”失败,错误代码为 1【英文标题】:"pip install models" - "python setup.py egg_info” failed with error code 1 【发布时间】:2019-01-22 08:30:18 【问题描述】:

尝试安装“模型”模块后,我收到此错误:

C:\Users\Filip>pip install models
Collecting models
Using cached https://files.pythonhosted.org/packages/92/3c/ac1ddde60c02b5a46993bd3c6f4c66a9dbc100059da8333178ce17a22db5/models-0.9.3.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\Filip\AppData\Local\Temp\pip-install-_exhlsc1\models\setup.py", line 25, in <module>
    import models
  File "C:\Users\Filip\AppData\Local\Temp\pip-install-_exhlsc1\models\models\__init__.py", line 23, in <module>
    from base import *
ModuleNotFoundError: No module named 'base'

----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\Filip\AppData\Local\Temp\pip-install-_exhlsc1\models\

如果我尝试安装模块“base”,则会出现此错误:

C:\Users\Filip>pip install base
Collecting base
Using cached https://files.pythonhosted.org/packages/1b/e5/464fcdb2cdbafc65f0b2da261dda861fa51d80e1a4985a2bb00ced080549/base-1.0.4.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\Filip\AppData\Local\Temp\pip-install-ueghc4dh\base\setup.py", line 40, in <module>
    LONG_DESCRIPTION = read("README.rst")
  File "C:\Users\Filip\AppData\Local\Temp\pip-install-ueghc4dh\base\setup.py", line 21, in read
    return codecs.open(os.path.join(os.path.dirname(__file__), fname)).read()
  File "c:\users\filip\appdata\local\programs\python\python37-32\lib\encodings\cp1252.py", line 23, in decode
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 5: character maps to <undefined>

----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\Filip\AppData\Local\Temp\pip-install-ueghc4dh\base\

如果我尝试安装其他软件包,一切正常,setuptools 和 pip 都会更新。 我的项目有这个模块是至关重要的,没有它我就做不了什么。

【问题讨论】:

试试pip install pymodels。你用它来做 django 吗? @Tauronek 我将它用于烧瓶。我将运行哪个命令来安装? 【参考方案1】:

它看起来像 models was renamed 到 pymodels 然后再次重命名为 doqu (source code) 我能够从 pypi 安装最新版本。这是遗留代码吗? Doqu 会为您的目的工作吗?

pip install doqu

【讨论】:

【参考方案2】:

在 codecademy.com FLASKFM 项目中存在类似的问题。如果您尝试在本地 IDE 上运行代码,则会出现错误。因为 module.py 文件还没有更新。更新 modul.py 文件后,您的 Flask 项目的主服务器应用程序应该可以工作了。

【讨论】:

以上是关于“pip install models”-“python setup.py egg_info”失败,错误代码为 1的主要内容,如果未能解决你的问题,请参考以下文章

python remove_whitespace_and_escapes_python

opencv-PIL-matplotlib-Skimage-Pytorch图片读取区别与联系

python 来自https://stackoverflow.com/questions/23602412/only-download-a-part-of-the-document-using-pyt

python 转储和加载稀疏矩阵https://stackoverflow.com/questions/11129429/storing-numpy-sparse-matrix-in-hdf5-pyt

BST插值建树re-balance再平衡构建AVL(Adelson-Velskii & Landis)平衡二叉搜索树,基于networkxbinarytree,implement by Pyt

BST插值建树re-balance再平衡构建AVL(Adelson-Velskii & Landis)平衡二叉搜索树,基于networkxbinarytree,implement by Pyt