草庐IT

setup_requires

全部标签

即使 "Requirement Already satisfied in Pip"也找不到 Python 模块

在OSX中写一些python,它说我用pip安装了几个包“ImportError:没有名为请求的模块”运行pip安装请求时>sudo-HpipinstallrequestsRequirementalreadysatisfied:requestsin/usr/local/lib/python2.7/site-packagesRequirementalreadysatisfied:certifi>=2017.4.17in/usr/local/lib/python2.7/site-packages(fromrequests)Requirementalreadysatisfied:charde

python - 为什么 `setup.py develop` 不起作用?

我想在开发模式下安装我的Python模块。正如我在许多示例中看​​到的那样,pythonsetup.pydevelop应该这样做。但是develop命令对于我的setup.py文件不存在:fromdistutils.coreimportsetupfromdistutils.extensionimportExtensionfromCython.BuildimportcythonizefromCython.Distutilsimportbuild_extimportossrc=["_NetworKit.pyx"]#listofsourcefilesmodules=[Extension("_

python - 如何使用 ansible 在 vi​​rtualenv 中运行 python setup.py develop 命令

我想使用ansible在vi​​rtualenv中执行pythonsetup.pydevelop命令。怎么做?大概是这样的:-name:eggshell:"pythonsetup.pydevelop"但我需要在virtualenv中执行它。我该怎么做? 最佳答案 一种方法是从virtualenv的bin目录调用python。-name:eggshell:"/path/to/env/bin/pythonsetup.pydevelop" 关于python-如何使用ansible在vi​​rt

Python setup.py 在 egg 中包含 .json 文件

我想在pythonegg文件中也打包.json文件。例如:boto包有endpoints.json文件。但是当我运行pythonsetup.pybdist_egg时,它不包含egg中的json文件。如何在egg中包含Json文件?如何在egg中包含*.json文件?下面是setup.py代码fromsetuptoolsimportsetup,find_packages,Extensionsetup(name='X-py-backend',version='tip',description='XPythonbackendtools',author='meme',packages=find

python - 有没有办法让 pip 在更新的 requirements.txt 中只安装新的依赖项

pipinstall--upgrade-rrequirements.txt对所有之前安装的依赖项重复安装过程,当我有大量依赖项(比如超过30个?)时,这可能会很痛苦有没有办法检查更新的requirements.txt并仅安装自上次安装尝试以来已包含在requirements.txt文件中的特定依赖项?我发现这是pip的真正缺pip(或者在virtualenv中使用pip来解决这个问题)。完全不喜欢pip的重复安装性质。 最佳答案 正如Piotr在上面的评论中提到的,如果命令中未包含“--upgrade”,则已安装的python包将保

python - 如何让 Travis CI 安装 tests_require 中声明的 Python 依赖项?

我有带有setup.py的Python包。它具有在install_requires中声明的常规依赖项和在tests_require中声明的开发依赖项,例如flake8.我认为pipinstall-e.或运行pythonsetup.pytest也会安装我的开发依赖项,它们将可用。然而,显然它们不是,我很难正确设置我的TravisCI构建。install:-"pipinstall-e."script:-"pythonsetup.pytest"-"flake8"如上配置的构建将失败,因为flake8将不会被发现为有效命令。我还尝试从pythonsetup.pytest命令内部调用flake8

python - Django 的@login_required 装饰器在人们未注册时将他们重定向到/accounts/login。如何更改此网址?

我希望它重定向到“/login”而不是“/accounts/login”是否有我可以更改的设置? 最佳答案 将LOGIN_URL='/login'添加到您的settings.py参见thedocs了解更多。 关于python-Django的@login_required装饰器在人们未注册时将他们重定向到/accounts/login。如何更改此网址?,我们在StackOverflow上找到一个类似的问题: https://stackoverflow.com/q

python - PIP 随机失败 'Could not find a version that satisfies the requirement' 相同要求.txt

作为CI测试的一部分,我们安装了一个virtualenv,其中包含来自常量requirements.txt文件的一些pip包。由于requirements.txt文件未更改,此安装过程有时会随机失败,原因不明。并且每次都是针对不同的随机包。CI在AWS机器上,所以我认为这不是互联网问题失败看起来类似于(不同的包失败):Collectingdjango-rest-auth==0.9.3(from-rrequirements.txt(line7))Couldnotfindaversionthatsatisfiestherequirementdjango-rest-auth==0.9.3(f

python - 一个 setup.py 中的多个项目?

我当前的setup.py(使用setuptools)安装两个东西,一个是tvdb_api(一个API包装器),另一个是tvnamer(一个命令行脚本)我希望将两者分开提供,这样用户就可以......easy_installtvdb_api..只获取API包装器,或者..easy_installtvnamer..安装tvnamer(和tvdb_api,作为要求)如果没有两个单独的setup.py脚本,这可能吗?你能有两个来自同一个pythonsetup.pyupload命令的独立PyPi包吗? 最佳答案 setup.py只是一个常规的

python - 在 setup.py 中使用 Unicode 元数据的正确方法是什么?

我正在使用setuptools为Python包编写setup.py,并希望在long_description字段中包含一个非ASCII字符:#!/usr/bin/envpythonfromsetuptoolsimportsetupsetup(...long_description=u"...",#inrealcodethisvalueisreadfromatextfile...)不幸的是,将unicode对象传递给setup()会导致以下两个命令中的任何一个出现UnicodeEncodeErrorpythonsetup.py--long-description|rst2htmlpyth