草庐IT

install-configuration

全部标签

python - 如何在 INSTALLED_APPS 中包含必备应用

我有一个正在构建的Django应用程序,我们将其称为foo。由于Foo的构建方式,它需要许多第三方django应用程序才能运行。例如,要运行Foo,安装应用程序可能如下所示:INSTALLED_APPS=('prereq1',prereq2','foo')事实上,要使Foo发挥作用,必须在django中安装'prereq1',prereq2'。现在,我可以将要求添加到requirements.txt或setup.py以确保在有人安装Foo时安装库,但是我不知道是否有办法将它们安装在Django本身中。这样做的原因是如果有人想使用Foo,我不想包括像这样的指令:InyourINSTALL

python - 错误 : No Commands supplied when trying to install pyglet

我已经下载了pyglet,但是当我运行“setup.py”,它只是在命令行:Traceback(mostrecentcalllast):File"C:\PythonX\Include\pyglet\pyglet-1.1.4\setup.py",line285,insetup(**setup_info)File"C:\Python27\lib\distutils\core.py",line140,insetupraiseSystemExit,gen_usage(dist.script_name)+"\nerror:%s"%msgSystemExit:usage:setup.py[glob

python - 哪个是最pythonic : installing python modules via a package manager ( macports, apt)或通过pip/easy_install/setuptools

通常我倾向于通过包管理器安装东西,用于unixy的东西。然而,当我编写大量perl程序时,我会使用CPAN、更新版本等等。一般来说,我过去常常通过包管理器安装系统的东西,通过它自己的包管理器(gem/easy_install|pip/cpan)安装语言的东西现在主要使用python,我想知道最佳实践是什么? 最佳答案 系统python版本及其库经常被发行版中的软件使用。只要您使用的软件对与您的发行版相同的python版本和所有库感到满意,那么使用发行包就可以正常工作。然而,您经常需要软件包的开发版本,或更新版本,或旧版本。然后它就不

python - easy_install 失败,出现错误 "Couldn' t 二进制文件上传后找不到安装脚本?

使用pythonsetup.pybdistupload上传我的PythonC扩展的二进制分发后,easy_install[my-package-name]失败并出现“error:Couldn”在/tmp/easy_install/package-name-etc-etc中找不到设置脚本。我做错了什么? 最佳答案 这可能与您的具体问题无关,但我提供此信息以防对其他人有帮助。我在运行easy_installxyz时遇到了这个错误。问题原来是我在当前工作目录中有一个名为xyz的子目录,而easy_install期望在该子目录中本地找到一个

python - 为什么 `pip install hwrt --upgrade`会升级到随机版本(有时也会降级)?

我刚执行完$sudopipinstallhwrt--upgrade安装最新版本的Python包hwrt。我添加了使用hwrt--version获取包版本的可能性。现在我得到了这个奇怪的行为:$hwrt--versionhwrt0.1.201$sudopipinstallhwrt--upgrade[...someoutput...]$hwrt--versionhwrt0.1.203$sudopipinstallhwrt--upgrade[...someoutput...]$hwrt--versionhwrt0.1.205$sudopipinstallhwrt--upgrade[...so

python 没有安装 setuptools 的 install_requires 中列出的依赖项

我写了一个依赖openpyxl的python模块。我希望使用setuptools将openpxyl作为依赖项自动安装。我读到正确的方法是在setup.py脚本中包含以下内容:setup(name='methpipe',version=find_version("lala","__init__.py"),description='Utilities',author='JonathanT',author_email='jt@lala.com',url='https://git.com...',packages=find_packages(),install_requires=['openp

python - pip install numpy 不起作用 : "No matching distribution found"

我是Python新手。我安装了Python2.7.10,它已经带有pip。我尝试运行此命令来下载NumPy库。D:\workspace\python>pipinstallnumpyCollectingnumpyCouldnotfindaversionthatsatisfiestherequirementnumpy(fromversions:)Nomatchingdistributionfoundfornumpy但是我得到了这个错误。我该如何解决这个问题?我也想知道easy_install和pip的区别。 最佳答案 您现在应该可以使用

python - pip install scikit-image 出错

我使用的是Windows8.164位和Python2.7。尝试从shell安装scikit-imagepipinstallscikit-image我遇到了这个错误:命令“pythonsetup.pyegg_info”在c:\users\france~1\appdata\local\temp\pip-buildtksnfe\scikit-image\中失败,错误代码为1下载没问题,但安装失败。这里有什么问题,如何解决?编辑升级我的pip之后python-mpipinstall-Upipsetuptools再试一次,我得到了:命令“pythonsetup.pyegg_info”在c:\us

python - ./configure --enable-shared 在 python altinstall 期间究竟做了什么?

当我使用altinstallpython2.7.12时./configure--prefix=/opt/python--enable-shared它出现为python2.7.5(系统默认python)但没有--enable-shared它显示为2.7.12,我错过了什么?这是在RHEL7.2上这不是路径问题:没有--enable-shared[root@myrig~]#/opt/python/bin/python2.7-VPython2.7.12使用--enable-shared[root@myrig~]#/opt/python/bin/python2.7-VPython2.7.5

python - 如何在 Windows 上使用 pip install 修复错误 “Expected version spec in …”?

在Windows7机器上,我使用以下命令从本地目录安装包:pipinstalladdons/pnc_tests--upgrade--extra-index-url=http://some_server/simple这会导致以下错误:C:\Users\alex\PNC\tas\ENV\Scripts\pip-script.pyrunon07/16/1407:50:47Exception:Traceback(mostrecentcalllast):File"C:\Users\alex\PNC\tas\ENV\lib\site-packages\pip\basecommand.py",lin