在Windows 10上使用Python3.9
我需要导入模块"TSheets“,但它会抛出其依赖项之一的异常:
from tsheets.api import TSheets
发生异常: ModuleNotFoundError:没有名为“模型”的模块
当我试图安装模型时
pip install models
我得到了输出
Collecting models
Using cached models-0.9.3.tar.gz (16 kB)
ERROR: Command errored out with exit status 1:
command: 'c:\python39\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\rober\\AppData\\Local\\Temp\\pip-install-utzl8ihq\\models_a160fe5c40f44b6180918e508f09440a\\setup.py'"'"'; __file__='"'"'C:\\Users\\rober\\AppData\\Local\\Temp\\pip-install-utzl8ihq\\models_a160fe5c40f44b6180918e508f09440a\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\rober\AppData\Local\Temp\pip-pip-egg-info-ijs4wmiu'
cwd: C:\Users\rober\AppData\Local\Temp\pip-install-utzl8ihq\models_a160fe5c40f44b6180918e508f09440a\
Complete output (7 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\rober\AppData\Local\Temp\pip-install-utzl8ihq\models_a160fe5c40f44b6180918e508f09440a\setup.py", line 25, in <module>
import models
File "C:\Users\rober\AppData\Local\Temp\pip-install-utzl8ihq\models_a160fe5c40f44b6180918e508f09440a\models\__init__.py", line 23, in <module>
from base import *
ModuleNotFoundError: No module named 'base'
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/92/3c/ac1ddde60c02b5a46993bd3c6f4c66a9dbc100059da8333178ce17a22db5/models-0.9.3.tar.gz#sha256=b5aa29c6b57a667cda667dd9fbd33bbd15c14cc285e57dda64f4f4c0fd35e0ae (from https://pypi.org/simple/models/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.我已经看到类似的问题,结果是Windows上的路径问题,但我不知道如何解决这一特殊情况。
我的Python3.9安装在路径C:\ Python 39上,以避免任何Windows问题。
当我尝试的时候我也会犯错误
pip install base谢谢你的想法和建议!
发布于 2021-04-16 00:27:32
models包在PyPI上与TSheets无关。见本问题:
https://github.com/TSheetsTeam/api_python/issues/7
根据github回购公司的评论,安装github回购应该修复它:
pip install --upgrade git+https://github.com/TSheetsTeam/api_python.git@301666970a2b70bb43b712923b8e48c412fda13a#egg=tsheetshttps://stackoverflow.com/questions/67117493
复制相似问题