草庐IT

WHOLE_MODULE_OPTIMIZATION

全部标签

python - 导入错误 : No module named 'email.mime' ; email is not a package

这个问题在这里已经有了答案:Importinginstalledpackagefromscriptwiththesamenameraises"AttributeError:modulehasnoattribute"or"ImportError:cannotimportname"(2个回答)关闭3年前。运行以下代码时,我不断收到错误消息:ImportError:Nomodulenamed'email.mime';emailisnotapackage所以我跑了:pipinstallemail并得到以下错误:ImportError:Nomodulenamed'cStringIO'...Com

python - gensim 错误 : ImportError: No module named 'gensim'

我尝试使用gensim导入importgensim但出现以下错误ImportErrorTraceback(mostrecentcalllast)in()---->1importgensim2model=gensim.models.Word2Vec.load_word2vec_format('./model/GoogleNews-vectors-negative300.bin',binary=True)ImportError:Nomodulenamed'gensim'我在python中安装了gensim。我将genssim用于word2vec。 最佳答案

python - 导入错误 : No module named redis

我已经使用sudoapt-getinstallredis-server命令安装了redis,但是当我运行Python程序时收到此错误:ImportError:Nomodulenamedredis知道出了什么问题,或者我是否也应该安装任何其他软件包?我使用的是Ubuntu13.04,我有Python2.7。 最佳答案 要安装redis-py,只需:$sudopipinstallredis或者(你确实应该使用pip):$sudoeasy_installredis或来自来源:$sudopythonsetup.pyinstall开始>>>i

python - 属性错误 : 'module' object has no attribute 'plt' - Seaborn

我对这些库非常陌生,并且在绘制时遇到了麻烦:importpandasaspdimportseabornassnsimportmatplotlib.pyplotaspltimportnumpyasnpimportrandomdf5=pd.read_csv('../../../../datos/tiempos-exacto-variando-n-m0.csv',sep=',',engine='python')print(df5)df5['n']=df5['n'].apply(lambdax:x**2)sns.jointplot(df5['n'],df5['tiempoTotal'],kin

python - 开始 celery : AttributeError: 'module' object has no attribute 'celery'

我尝试从命令行启动Celery工作服务器:celery-Atasksworker--loglevel=infotasks.py中的代码:importosos.environ['DJANGO_SETTINGS_MODULE']="proj.settings"fromceleryimporttask@task()defadd_photos_task(lad_id):...我得到下一个错误:Traceback(mostrecentcalllast):File"/usr/local/bin/celery",line8,inload_entry_point('celery==3.0.12','c

python - pip 差错误 : 'module' object has no attribute 'Cryptography_HAS_SSL_ST'

我尝试从pip安装并不断收到类似类型的错误。$pipinstallquandlTraceback(mostrecentcalllast):File"/usr/bin/pip",line9,inload_entry_point('pip==1.5.6','console_scripts','pip')()File"/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py",line558,inload_entry_pointreturnget_distribution(dist).load_entry_point(group,n

python - 导入错误 : No module named '_curses' when trying to import blessings

我正在尝试运行这个:fromblessingsimportTerminalt=Terminal()print(t.bold('Hithere!'))print(t.bold_red_on_bright_green('Ithurtsmyeyes!'))witht.location(0,t.height-1):print('Thisisatthebottom.')这里的第一个例子是:https://pypi.python.org/pypi/blessings.但是,我收到此错误:Traceback(mostrecentcalllast):File"",line1,inFile"C:\Use

python 3 : module in same directory as script: "ImportError: No module named"

我正在尝试从IPythonshell导入一个模块(venues)。venues模块已正确导入,但它随后尝试自行导入名为makesoup的模块,但未能成功。我位于~目录中,并正在尝试导入位于子目录processors中的venues.py文件。makesoup.py文件也位于processors子目录中,这意味着它附近的任何Python脚本都应该能够找到它,对吧?In[1]:importprocessors.venues---------------------------------------------------------------------------ImportErro

python - 在 virtualenv : installed sklearn module not available 中运行 Jupyter notebook

我已经安装了一个创建的virtualenvma​​chinelearn并在那个环境中安装了一些python模块(pandas、scipy和sklearn)。当我运行jupyternotebook时,我可以在我的笔记本中导入pandas和scipy-但是,当我尝试导入sklearn时,我收到以下错误消息:importsklearn---------------------------------------------------------------------------ImportErrorTraceback(mostrecentcalllast)in()---->1import

python - 属性错误 : 'module' object has no attribute 'ORB'

当我运行我的python代码时importnumpyasnpimportcv2importmatplotlib.pyplotaspltimg1=cv2.imread('/home/shar/home.jpg',0)#queryImageimg2=cv2.imread('/home/shar/home2.jpg',0)#trainImage#InitiateSIFTdetectororb=cv2.ORB()#findthekeypointsanddescriptorswithSIFTkp1,des1=orb.detectAndCompute(img1,None)kp2,des2=orb.