草庐IT

install-rectangular-package

全部标签

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 是否具有 Rails 的 "bundle install"的等价物?

我喜欢Rails项目的一件事是,当部署到远程服务器时,如果一切设置正确,您可以这样做:$:bundleinstall并且系统会安装运行项目所需的各种依赖项(rubygems)。Python/Django有类似的东西吗? 最佳答案 您可以卡住需求。这会生成项目所需的所有Python模块的列表。我相信bundle在概念上是相似的。例如:virtualenv--no-site-packagesmyproject_env#createablankPythonvirtualenvironmentsourcemyproject_env/bin/

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 - 'easy_install' 不是内部或外部命令、可运行程序或批处理文件

我刚刚在我的Windows7机器上下载并安装了最新版本的Python。Python2.7.3现在我想安装一个Twitterlibrary我在网上找到:但是,当我尝试运行easy_installtweepy时,我收到此错误消息:'easy_install'isnotrecognizedasanininternalorexternalcommand,operableprogramorbatchfile.Python已经放在我的路径中,因为我可以在命令行中调用Python程序。这是我安装Python的文件夹的屏幕截图。在工具文件夹中:在脚本文件夹中: 最佳答案

python - 如何在 Windows 上的 http 代理后面使用 easy_install?

当我使用命令时:easy_install观察器要安装spotter包,我收到以下错误消息SearchingforspotterReadinghttp://pypi.python.org/simple/spotter/Downloaderroronhttp://pypi.python.org/simple/spotter/:[Errno11001]getaddrinfofailed--Somepackagesmaynotbefound!Readinghttp://pypi.python.org/simple/spotter/Downloaderroronhttp://pypi.pytho

python - 导入错误 : with error 'is not a package'

在python3中遇到ImportError问题。我的项目结构如下:cts_sap_polaris/|--etc||--clean_cts_sap_polaris.yaml||--clean_env_variables.tcl||--cts_sap_polaris_ha_combined.yaml||--cts_sap_polaris.yaml|`--TCL_TESTBED_CONFIGS|--__init__.py|--jobs||--__init__.py||--__pycache__||`--run_cts_sap_polaris.cpython-34.pyc|`--run_ct

Python 导入优先级 : packages or modules?

我不清楚如何正确命名这个问题。案例一假设我有以下目录结构。foo|+-bar/__init__.py|+-bar.py如果我有fromfooimportbar我如何知道正在导入哪个柱(bar.py或bar/__init__.py)?有什么简单的方法可以自动检测这种情况的发生吗?案例二foo|+-foo.py|+-other.py如果other.py有这行importfoo我如何知道正在导入哪个foo(foo或foo.foo)?同样,是否有任何简单的方法可以自动检测这种情况的发生? 最佳答案 TLDR;如果包在同一目录中,则包优先于同

python - easy_install-2.7 的问题

安装easy_install并尝试使用它安装python包后,它失败了。[root@server]#easy_install-2.7pipSearchingforpipReadinghttp://pypi.python.org/simple/pip/Downloaderroronhttp://pypi.python.org/simple/pip/:unknownurltype:https--Somepackagesmaynotbefound!我似乎得到了重定向curl-ILhttp://pypi.python.org/simple/pip/HTTP/1.1301MovedPermane