草庐IT

require_parentheses

全部标签

python - 每个包 ("Could not find a version that satisfies the requirement"的“pip install”都失败)

这个问题在这里已经有了答案:NotabletoinstallPythonpackages[SSL:TLSV1_ALERT_PROTOCOL_VERSION](17个回答)关闭4年前。pipinstall对我来说每个包裹都失败了。这是我得到的:Couldnotfindaversionthatsatisfiestherequirement我sawsimilarquestions在StackOverflow上,但它们似乎与这个并不完全相关。另外,thispost表明如果PyPI关闭或我的IP地址被列入黑名单,这可能会发生。我的情况似乎两者都不正确。pip在运行时显示最新的pipinstall

Python MySQLdb 问题(TypeError : %d format: a number is required, 不是 str)

我正在尝试执行以下插入操作:cursor.execute("""insertintotree(id,parent_id,level,description,code,start,end)values(%d,%d,%d,%s,%s,%f,%f)""",(1,1,1,'abc','def',1,1))我的MYSQL表的结构是:idint(255),parent_idint(255),levelint(11),descriptionvarchar(255),codevarchar(255),startdecimal(25,4),enddecimal(25,4)但是当我运行我的程序时,我得到了

Python MySQLdb 问题(TypeError : %d format: a number is required, 不是 str)

我正在尝试执行以下插入操作:cursor.execute("""insertintotree(id,parent_id,level,description,code,start,end)values(%d,%d,%d,%s,%s,%f,%f)""",(1,1,1,'abc','def',1,1))我的MYSQL表的结构是:idint(255),parent_idint(255),levelint(11),descriptionvarchar(255),codevarchar(255),startdecimal(25,4),enddecimal(25,4)但是当我运行我的程序时,我得到了

python - 获取类型错误 : __init__() missing 1 required positional argument: 'on_delete' when trying to add parent table after child table with entries

我的sqlite数据库中有两个类,一个名为Categorie的父表和名为Article的子表.我首先创建了子表类并添加了条目。所以首先我有这个:classArticle(models.Model):titre=models.CharField(max_length=100)auteur=models.CharField(max_length=42)contenu=models.TextField(null=True)date=models.DateTimeField(auto_now_add=True,auto_now=False,verbose_name="Datedeparutio

python - 获取类型错误 : __init__() missing 1 required positional argument: 'on_delete' when trying to add parent table after child table with entries

我的sqlite数据库中有两个类,一个名为Categorie的父表和名为Article的子表.我首先创建了子表类并添加了条目。所以首先我有这个:classArticle(models.Model):titre=models.CharField(max_length=100)auteur=models.CharField(max_length=42)contenu=models.TextField(null=True)date=models.DateTimeField(auto_now_add=True,auto_now=False,verbose_name="Datedeparutio

python - 使用 pip 命令从 requirements.txt 升级 python 包

如何使用pip命令从requirements.txt文件中升级我的所有python包?用下面的命令试过$pipinstall--upgrade-rrequirements.txt因为,python包的后缀是版本号(Django==1.5.1),它们似乎没有升级。有没有比手动编辑requirements.txt文件更好的方法?编辑正如Andy在他的回答中提到的,包被固定到特定版本,因此无法通过pip命令升级包。但是,我们可以通过pip-tools使用以下命令来实现这一pip。$pip-review--auto这将自动升级requirements.txt中的所有包(确保使用pipinsta

python - 使用 pip 命令从 requirements.txt 升级 python 包

如何使用pip命令从requirements.txt文件中升级我的所有python包?用下面的命令试过$pipinstall--upgrade-rrequirements.txt因为,python包的后缀是版本号(Django==1.5.1),它们似乎没有升级。有没有比手动编辑requirements.txt文件更好的方法?编辑正如Andy在他的回答中提到的,包被固定到特定版本,因此无法通过pip命令升级包。但是,我们可以通过pip-tools使用以下命令来实现这一pip。$pip-review--auto这将自动升级requirements.txt中的所有包(确保使用pipinsta

python - 最新的 'pip' 失败,出现 "requires setuptools >= 0.8 for dist-info"

使用最新(1.5)版本的pip,我在尝试更新多个软件包时遇到错误。例如,sudopipinstall-Upytz会导致失败:Wheelinstallsrequiresetuptools>=0.8fordist-infosupport.pip'swheelsupportrequiressetuptools>=0.8fordist-infosupport.我不明白这条消息(Ihavesetuptools2.1)或如何处理。此错误日志中的异常信息:Exceptioninformation:Traceback(mostrecentcalllast):File"/Library/Python/2

python - 最新的 'pip' 失败,出现 "requires setuptools >= 0.8 for dist-info"

使用最新(1.5)版本的pip,我在尝试更新多个软件包时遇到错误。例如,sudopipinstall-Upytz会导致失败:Wheelinstallsrequiresetuptools>=0.8fordist-infosupport.pip'swheelsupportrequiressetuptools>=0.8fordist-infosupport.我不明白这条消息(Ihavesetuptools2.1)或如何处理。此错误日志中的异常信息:Exceptioninformation:Traceback(mostrecentcalllast):File"/Library/Python/2

python - pypi 用户警告 : Unknown distribution option: 'install_requires'

是否有人在执行PyPI包的pythonsetup.pyinstall时遇到此警告?install_requires定义包需要什么。很多PyPI包都有这个选项。怎么可能是“未知的分发选项”? 最佳答案 pythonsetup.py使用不支持install_requires的distutils。setuptools确实,也分发(它的继任者)和pip(使用其中之一)。但你实际上必须使用它们。IE。通过easy_install命令或pipinstall调用setuptools。另一种方法是从setup.py中的setuptools导入设置,