草庐IT

python - django - 导入错误 : no module named views

我绞尽脑汁想不通为什么在导入'views'时会出现导入错误。当我访问我的索引页面时收到以下消息:"RequestMethod:GETRequestURL:http://127.0.0.1:8000/moments/DjangoVersion:1.6.1ExceptionType:ImportErrorExceptionValue:NomodulenamedviewsExceptionLocation:C:\Python27\lib\site-packages\django\utils\importlib.pyinimport_module,line40"这是我的urls.pyfromd

python - Ubuntu 13.10 : No Module Named appindicator

Appindicator在Ubuntu13.10上不可用?jason@jz:~$pythonPython2.7.5+(default,Sep192013,13:48:49)[GCC4.8.1]onlinux2Type"help","copyright","credits"or"license"formoreinformation.>>>importappindicatorTraceback(mostrecentcalllast):File"",line1,inImportError:Nomodulenamedappindicator>>>有替代品吗?还是我可以自己安装?提前致谢。

python - 加载 MySQLdb 模块时出错 : No module named 'MySQLdb'

我已经尝试了很多方法来解决这个问题,但我没有解决。我在google和stackoverflow上搜索了很多,没有适合我的选项。请帮我。提前致谢。我正在使用django1.10,python3.4。我试过了:pip安装mysqldb。pip安装mysql。pip安装mysql-python。pip安装MySQL-python。easy_installmysql-python。easy_installMySQL-python。还剩下什么吗?C:\Users\benq\Desktop\dimo-develop\Project>pythonmanage.pyrunserverUnhandled

python - Virtualenv 中 Mac OS X 上的 ImportError : No module named setuptools. 命令

尝试在MacOSX上的virtualenv中安装Pythonpip包(DjangoRestFramework文档,drfdocs):下面是pip、python、easy_install的相关版本:$virtualenv--version1.11.4$mkvirtualenvtestNewpythonexecutableintest/bin/pythonInstallingsetuptools,pip...done.(test)$python--version;whichpythonPython2.7.10/Users/me/.virtualenvs/test/bin/python(te

python - Mac - Python - 导入错误 : "No module named site"

今晚我正在尝试安装名为“requests”的包,并且已经开始在终端上摸索,并且在涉及到这类事情时并没有太多的直觉。电脑是macmini,osx版本10.9.4在/Library/Python中我有4个文件夹:2.32.52.6和2.7。在/Applications中我有“Python2.7”和“Python3.4”我可以打开IDLE并输入8+8,我得到16就好了。这是我在终端中遇到的错误:host-210-117:~Mario$pythonImportError:Nomodulenamedsitehost-210-117:~Mario$pipImportError:Nomodulena

python - ImportError : No module named twisted. persisted.styles

在IDLE中,我尝试使用新安装的scrapy1.0.3运行脚本。我正在使用一个friend的脚本,该脚本曾为它工作(但在Windows上,我在Mac上)。从第一行导入scrapy开始,运行程序时报错:ImportError:没有名为twisted.persisted.styles的模块整个脚本,如果有帮助的话,指向这个:Traceback(mostrecentcalllast):File"/Users/eliasfong/tutorial/tutorial/spiders/medspider.py",line1,inimportscrapyFile"/Library/Python/2.

python - 导入错误 : No module named 'setup'

我正在使用GoogleAppEngine,我想使用dev_appserver.py将我的应用程序部署到本地主机,但是当我这样做时,它指定某个名为“bootstrapping.py”的文件正在尝试导入“setup”,并且没有具有该名称的模块。我安装了python3.5。我还将google-cloud-sdk\bin保存到环境变量中的Path中。我没有安装我应该安装的东西吗? 最佳答案 我遇到了同样的问题,但可以通过切换到Python2.7来解决。我正在使用Conda,它有一个很好的指南来创建Python2.7环境,同时仍然能够轻松切换

python - 由于 "ImportError: No module named osutil"无法运行 hg

尝试运行任何hg命令时出现以下错误。我尝试卸载并重新安装XCode和开发工具。Traceback(mostrecentcalllast):File"/usr/local/bin/hg",line41,inmercurial.util.setbinary(fp)File"/usr/local/lib/python2.7/site-packages/mercurial/demandimport.py",line102,in__getattribute__File"/usr/local/lib/python2.7/site-packages/mercurial/demandimport.py

python - 应用引擎 : ImportError: No module named Crypto. 哈希

我有一个使用Crypto.Hash的脚本,但导入失败并出现错误:ImportError:NomodulenamedCrypto.Hash在我的sys.path中,如果我打印sys.path列表,则有这个条目(以及其他条目):/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/lib/pycrypto-2.6如果我打开上面的路径,没有pycrypto-2.6目录。我怎样才能加载pycry

python - 导入错误 : No module named cycler

我正在使用wxpython和matplotlib开发一个软件,当我完成我的工作时,我想通过py2exe将python文件转换为“*.exe”文件,这样它就可以在Windows中使用。这是“设置.py”文件。fromdistutils.coreimportsetupimportpy2exeimportsysincludes=["encodings","encodings.*"]sys.argv.append("py2exe")options={"py2exe":{"bundle_files":1,"dll_excludes":["MSVCP90.dll"]}}setup(options=