尝试安装“模型”模块后,出现此错误:
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将更新。 对于我的项目来说,拥有这个模块非常重要,没有它我就不能做。
答案 0 :(得分:1)
看起来像models
was renamed到pymodels,然后再次重命名为doqu (source code),我能够从pypi安装最新版本。这是旧版代码吗? Doqu会为您工作吗?
pip install doqu
答案 1 :(得分:0)
codecademy.com FLASKFM项目中存在类似的问题。如果您尝试在本地IDE上运行代码,则会出现错误。由于module.py文件尚未更新。更新modul.py文件后,用于Flask项目的主服务器应用程序应该可以工作。