草庐IT

single-version-externally-managed

全部标签

python - Django:python manage.py migrate 什么都不做

我刚开始学习Django,当我尝试应用我的迁移时,第一个问题出现了。我启动服务器,输入pythonmanage.pymigrate什么也没有发生。没有错误,没有崩溃,只是没有响应。Performingsystemchecks...Systemcheckidentifiednoissues(0silenced).Youhave13unappliedmigration(s).Yourprojectmaynotworkproperlyuntilyouapplythemigrationsforapp(s):admin,auth,contenttypes,sessions.Run'pythonm

python - pip:有什么解决方法可以避免 --allow-external?

pip安装程序的最新版本没有安装不会将其包文件上传到PyPI的包,除非用户明确提供--allow-external选项(relatedanswer)。我想分发依赖于此类库的包,如dirspec.目前我必须告诉我的包的用户通过以下命令安装我的包:$pipinstall--allow-externaldirspecMyPackage当涉及到库打包时,问题就更多了。如果我的包是一个库,我还必须告诉依赖我的包的包的作者告诉他们的用户通过以下命令安装他们的包:$pipinstall--allow-externaldirspecTheirPackage是否有任何解决方法可以避免这种情况?

python celery - ImportError : No module named _curses - while attempting to run manage. py celeryev

背景Windows7x64Python2.7Django1.4带Redisbundle的celery在尝试运行manage.pyceleryev时,我在终端中收到以下错误importcursesFile'c:\Python2\lib\curses\__init__.py',line15,infrom_cursesimport*ImportError:Nomodulenamed_curses我试过查看其他帖子,但未能解决这个问题。关于导致此错误的原因有什么想法吗?提前致谢。 最佳答案 根据http://docs.python.org/

python - Pandas v0.17.0 : AttributeError: 'unicode' object has no attribute 'version'

我在我的linuxsuse13.264位上直接从源代码安装了pandasv0.17.0。我之前使用yast安装了v0.14.1。现在>>>importpandasTraceback(mostrecentcalllast):File"",line1,inFile"/usr/lib64/python2.7/site-packages/pandas-0.17.0-py2.7-linux-x86_64.egg/pandas/__init__.py",line44,infrompandas.core.apiimport*File"/usr/lib64/python2.7/site-package

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 - Satchmo 克隆satchmo.py ImportError : cannot import name execute_manager

我让satchmo尝试,但我在第一次尝试时遇到了一个很大的问题,我不明白哪里出了问题。当我将$pythonclonesatchmo.py制作成清晰的django项目时,它会报错:$pythonclonesatchmo.pyCreatingtheSatchmoApplicationCustomizingthefilesPerforminginitialdatasynchingTraceback(mostrecentcalllast):File"manage.py",line18,infromdjango.core.managementimportexecute_managerImport

python - 使用 Tk Grid Geometry Manager 的 GUI 布局

使用Python构建一个供个人使用的小型应用程序,我想尝试使用Tkinter进行一些GUI编程。这是我到目前为止创建的GUI:应用疑惑:如何确保屏幕截图中的三个LableFrames(A、B和C)具有相同的宽度?(或者更确切地说,宽度等于三个中最宽的?例如,在屏幕截图中,A是最宽的,我希望B和C也一样宽-直到D行)。(它不必动态计算-如果我能确保第一次编码时宽度相同就足够了。它们不需要在运行时更改。)TkGridGeometryManager疑惑:当您使用框架时,网格(行、列)是仅针对框架的大小特定的,还是根据窗体(根窗口)的大小计算的?如何确定网格中列的大小?我还没有完全理解“权重”

python - 安装 BlueJeans session API 客户端时出现 "pipenv requires an #egg fragment for version controlled dependencies"警告

改编来自https://github.com/bluejeans/api-rest-meetings/tree/master/libs/python#pip-install的说明,在pipenvshell我正在尝试运行pipenvinstallgit+https://github.com/bluejeans/api-rest-meetings.git@pip-repo但是,我收到以下错误消息:⠋WARNING:pipenvrequiresan#eggfragmentforversioncontrolleddependencies.Pleaseinstallremotedependenc

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

python - Pandas 数据框 : How to print single row horizontally?

DataFrame的单行并排打印值,即column_name然后是columne_value在一行中,下一行包含下一个column_name和columne_value。例如下面的代码importpandasaspddf=pd.DataFrame([[100,200,300],[400,500,600]])forindex,rowindf.iterrows():#otheroperationsgoeshere....printrow第一行的输出为010012002300Name:0,dtype:int64有没有办法水平打印每一行并忽略数据类型名称?第一行示例:012100200300