草庐IT

dist-packages

全部标签

python - 没有这样的列 : django_content_type. 名称

我在我的网站example.com上部署了django-oscar的示例应用程序沙箱。我想把它移到example.com:8000并在example.comurl运行另一个项目。我成功完成了第二部分,当你进入example.com时,你可以看到较新的django项目正在运行,但问题是,第一个django项目是django-oscar的沙箱,不会正确响应。当您输入example.com:8000时,您会看到当前的调试日志:nosuchcolumn:django_content_type.nameRequestMethod:GETRequestURL:http://example.com:

python - Django 管理中的 MultiValueDictKeyError

更新型号:classPicturesManager(models.Manager):defcreate_pictures(self,flat,img):pictures=self.create(car=car,image=img)returnpicturesdefget_file_path(instance,filename):filename="%s.%s"%(uuid.uuid4(),filename.split('.')[-1])returnos.path.join('car_img/',filename)classPictures(models.Model):car=model

python - 类型错误 : dist must be a Distribution instance

我的包依赖于BeautifulSoup。如果我通过pythonsetup.pydevelop在新的virtualenv中安装我的包,我会收到以下错误。如果我第二次执行pythonsetup.pydevelop,一切似乎都正常。我不知道发生了什么。如何修复它以获得可重现的设置?Bestmatch:beautifulsoup44.3.2Downloadinghttps://pypi.python.org/packages/source/b/beautifulsoup4/beautifulsoup4-4.3.2.tar.gz#md5=b8d157a204d56512a4cc196e53e7d

python - Mac 操作系统, pip : specify compiler for packages containing C libraries

我在使用pip使用默认的clang编译器编译mapscript(是来自pypi的包含C代码的包)时遇到了一些问题。这是我的尝试:-$sudopipinstallmapscriptPassword:Downloading/unpackingmapscriptRunningsetup.pyegg_infoforpackagemapscriptRequirementalreadysatisfied(use--upgradetoupgrade):distributein/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib

python - "PermissionError: [Errno 13] Permission denied: '/usr/lib/python3.5/site-packages '"安装Django

我无法在Ubuntu上安装基本的Django包。我刚刚删除了virtualenv并重新制作了它。pip3install=pip3install-rrequirements.txt[mything]cchilders@cchilders-desktop:~/projects/mything(master)$catrequirements.txtDjango==1.10.1django-filterdjangorestframeworkpsycopg2twilioipdbipython[mything]cchilders@cchilders-desktop:~/projects/mythi

python - 从 Python 解释器运行时获取 "ImportError: attempted relative import with no known parent package"

我正在使用Flask创建模块化应用blueprints特征。结果,我的目录结构是这样的:project__init__.pyconfig.pymould.pymodules__init__.pycore__init__.pycore.pydb.pymodels.py不要将此处的模块目录与Python模块混淆,它们用于为我的项目提供模块化结构(核心模块、foo模块、bar模块等)。现在,模块目录中的每个文件夹(以及其中的同名模块,例如core.core)都动态导入到我的主flask应用程序(mould.py)中这样做:foriteminos.listdir("modules"):ifno

python - python2 存在 site-packages 文件夹,python3 不存在

作为root用户,我看到:root@5d6f29f1d4e9:/usr/local/lib/python2.7#ls-a...dist-packagessite-packagesroot@5d6f29f1d4e9:/usr/local/lib/python3.6#ls-a...dist-packages当我运行这个时:find/-typed-name'site-packages'唯一的结果是:/usr/local/lib/python2.7/site-packages有谁知道为什么我在3.6中看不到站点包?我安装了python3:aptinstall-ybuild-essentiall

python - 在 Django 表单中使用 reverse()

我正在尝试使用django的reverse()在为我的自定义小部件定义django表单时起作用,但出现错误:ImproperlyConfiguredTheincludedurlconfurlsdoesn'thaveanypatternsinit代码如下:classWorkForm(forms.Form):#...category=forms.ChoiceField(required=True,label=_('Category'),help_text=_('Selectmostappropriatecategoryforyourwork.'))subcategory=forms.Cho

Collecting package metadata (repodata.json): failedCondaSSLError: Encountered an SSL error. 一招解决

Collectingpackagemetadata(repodata.json):failedCondaSSLError:EncounteredanSSLerror.Mostlikelyacertificateverificationissue.先找到你的anaconda安装的位置,按照D:\Anaconda\Library\bin这个路径,复制bin文件下的这两个文件粘贴到D:\Anaconda\DLLs里面接着重启电脑就OK了

python - Django-1.3 beta 的问题

伙计们!我非常热衷于学习django并在Django-1.2上学习了一些,但后来我安装了1.3版本,这没问题,直到我使用命令“pythonmanage.pyrunserver”运行服务器。它给出了一个巨大的错误。我想不出解决这个问题的方法。错误给出为:Traceback(mostrecentcalllast):File"manage.py",line11,inexecute_manager(settings)File"/usr/local/lib/python2.6/dist-packages/django/core/management/__init__.py",line438,in