pycharm安装pygame报错ImportError: No module named 'pygame.base'急急急!!!

图片说明!图片说明!图片说明
图片说明

都配置好了为什么导入不了???

2个回答

图片说明
你这个文件不应该是pygame包的路径吗

qq_42978799
qq_42978799 回复qq_42978799: 不知道为什么多了一个pygame文件夹,删掉就好了
4 个月之前 回复
as_csdn
流浪_过客 回复qq_42978799: 这个案例我也做过,但是里面没提到说有pygame这个文件夹,是你自己加的吗?
4 个月之前 回复
qq_42978799
qq_42978799 请问我需要怎么改
4 个月之前 回复

应该是安装时放的位置不对吧,看一下路径。

通过pip安装的包路径C:\Users\用户\AppData\Local\Programs\Python\Python37\Lib\site-packages

如果不是pip安装的你就自己检查一下路径吧

qq_43066253
微风丶a_Sen 回复qq_42978799: 这个案例我也做过,不过当时我没有使用pygame.base,我刚才看了一下pygame包的内部,确实可以有你这种from pygame.base import *
4 个月之前 回复
qq_43066253
微风丶a_Sen 回复qq_42978799: 你只使用import pygame报错吗?
4 个月之前 回复
qq_42978799
qq_42978799 回复微风丶a_Sen: 你看看刚刚传的图 好像没问题呀
4 个月之前 回复
qq_43066253
微风丶a_Sen 回复qq_42978799: 看一下你的pygame包的位置,是不是在该目录下,这种情况有90%的可能是路径的问题
4 个月之前 回复
qq_42978799
qq_42978799 麻烦可以说详细一点吗 哪个文件应该放哪
4 个月之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
ImportError: No module named nose_parameterized
在学习Theano的过程中,为什么仅仅是from theano import sparse就出现这个错误
ImportError: No module named 'sklearn.model_selection'
环境:win10 anaconda3 ,python 3.5 rn问题:在jupyter notebook 中使用sklearn库时,报错:[color=#FF0000][b]ImportError: No module named 'sklearn.model_selection'[/b][/color]rn详细信息如图1所示:rn[align=center][img=https://img-bbs.csdn.net/upload/201707/05/1499261489_576021.png][/img][/align]rn[align=center]图1[/align]rn按照wisdom_bo博客所说在Anaconda prompty 输入:conda update scikit-learn来更新sklearn库。但是在unlinking packages的时候一直没有进度,电脑有网。如图2所示:rn[align=center][img=https://img-bbs.csdn.net/upload/201707/05/1499261686_557725.png][/img][/align]rn[align=center]图2[/align]rn请问大神这是怎么回事啊,我等了好久,大概一个小时也没有反应,即使包再大等一个小时总有进度吧,请求支援!!谢谢谢谢能有人解答!
ImportError: No module named '_pywrap_tensorflow_internal'
tensorflow==1.5.0 安装成功;继续安装gpu版本,按系统提示再安装 CUDA-9.0, cuDNN-7.0: cuda_9.0.176_win10_network以及patch1-4 / cudnn-9.0-windows10-x64-v7.3.1.20. 运行‘import tensorflow as tf’后报错: ImportError: No module named '_pywrap_tensorflow_internal'rnrn谢谢帮助rnrn ---------------------------------------------------------------------------rnImportError Traceback (most recent call last)rnC:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py in swig_import_helper()rn 17 try:rn---> 18 return importlib.import_module(mname)rn 19 except ImportError:rnrnC:\Program Files\Anaconda3\lib\importlib\__init__.py in import_module(name, package)rn 125 level += 1rn--> 126 return _bootstrap._gcd_import(name[level:], package, level)rn 127 rnrnC:\Program Files\Anaconda3\lib\importlib\_bootstrap.py in _gcd_import(name, package, level)rnrnC:\Program Files\Anaconda3\lib\importlib\_bootstrap.py in _find_and_load(name, import_)rnrnC:\Program Files\Anaconda3\lib\importlib\_bootstrap.py in _find_and_load_unlocked(name, import_)rnrnC:\Program Files\Anaconda3\lib\importlib\_bootstrap.py in _load_unlocked(spec)rnrnC:\Program Files\Anaconda3\lib\importlib\_bootstrap.py in module_from_spec(spec)rnrnC:\Program Files\Anaconda3\lib\importlib\_bootstrap_external.py in create_module(self, spec)rnrnC:\Program Files\Anaconda3\lib\importlib\_bootstrap.py in _call_with_frames_removed(f, *args, **kwds)rnrnImportError: DLL load failed: 找不到指定的程序。rnrnDuring handling of the above exception, another exception occurred:rnrnImportError Traceback (most recent call last)rnC:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py in ()rn 57 rn---> 58 from tensorflow.python.pywrap_tensorflow_internal import *rn 59 from tensorflow.python.pywrap_tensorflow_internal import __version__rnrnC:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py in ()rn 20 return importlib.import_module('_pywrap_tensorflow_internal')rn---> 21 _pywrap_tensorflow_internal = swig_import_helper()rn 22 del swig_import_helperrnrnC:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py in swig_import_helper()rn 19 except ImportError:rn---> 20 return importlib.import_module('_pywrap_tensorflow_internal')rn 21 _pywrap_tensorflow_internal = swig_import_helper()rnrnC:\Program Files\Anaconda3\lib\importlib\__init__.py in import_module(name, package)rn 125 level += 1rn--> 126 return _bootstrap._gcd_import(name[level:], package, level)rn 127 rnrnImportError: No module named '_pywrap_tensorflow_internal'rnrnDuring handling of the above exception, another exception occurred:rnrnImportError Traceback (most recent call last)rn in ()rn----> 1 import tensorflow as tfrnrnC:\Program Files\Anaconda3\lib\site-packages\tensorflow\__init__.py in ()rn 22 rn 23 # pylint: disable=wildcard-importrn---> 24 from tensorflow.python import *rn 25 # pylint: enable=wildcard-importrn 26 rnrnC:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\__init__.py in ()rn 47 import numpy as nprn 48 rn---> 49 from tensorflow.python import pywrap_tensorflowrn 50 rn 51 # Protocol buffersrnrnC:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py in ()rn 72 for some common reasons and solutions. Include the entire stack tracern 73 above this error message when asking for help.""" % traceback.format_exc()rn---> 74 raise ImportError(msg)rn 75 rn 76 # pylint: enable=wildcard-import,g-import-not-at-top,unused-import,line-too-longrnrnImportError: Traceback (most recent call last):rn File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 18, in swig_import_helperrn return importlib.import_module(mname)rn File "C:\Program Files\Anaconda3\lib\importlib\__init__.py", line 126, in import_modulern return _bootstrap._gcd_import(name[level:], package, level)rn File "", line 986, in _gcd_importrn File "", line 969, in _find_and_loadrn File "", line 958, in _find_and_load_unlockedrn File "", line 666, in _load_unlockedrn File "", line 577, in module_from_specrn File "", line 906, in create_modulern File "", line 222, in _call_with_frames_removedrnImportError: DLL load failed: 找不到指定的程序。rnrnDuring handling of the above exception, another exception occurred:rnrnTraceback (most recent call last):rn File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in rn from tensorflow.python.pywrap_tensorflow_internal import *rn File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 21, in rn _pywrap_tensorflow_internal = swig_import_helper()rn File "C:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 20, in swig_import_helperrn return importlib.import_module('_pywrap_tensorflow_internal')rn File "C:\Program Files\Anaconda3\lib\importlib\__init__.py", line 126, in import_modulern return _bootstrap._gcd_import(name[level:], package, level)rnImportError: No module named '_pywrap_tensorflow_internal'rnrnrnFailed to load the native TensorFlow runtime.rnrnSee https://www.tensorflow.org/install/install_sources#common_installation_problemsrnrnfor some common reasons and solutions. Include the entire stack tracernabove this error message when asking for help.
ImportError: No module named django.db
#-*- coding:utf-8 -*-rnrnfrom django.db import modelsrnrnclass Topics(models.Model):rn """用户学习的主题"""rn text = models.CharField(max_length=200)rn date_added = models.DateTimeField(auto_now_add=ture)rnrn def __str__(self):rn """返回模型的字符串表示"""rn return self.text
ImportError: No module named sets
谁值得这个是什么错误啊rnlinux下rnTraceback (most recent call last):rn File "/usr/local/mpich2/bin/mpd", line 87, in ?rn from sets import Set as setrnImportError: No module named setsrn帮忙指点一下
ImportError: No module named 'matplotlib.externals'
如题,帮忙解决一下这个问题,谢谢!rnTraceback (most recent call last):rn File "E:\python34\test.py", line 1, in rn import matplotlib.pyplot as pltrn File "E:\python34\lib\site-packages\matplotlib\pyplot.py", line 21, in rn from matplotlib.externals import sixrnImportError: No module named 'matplotlib.externals'
ImportError: No module named java.lang.System
[root@localhost autodomain]# python createDomain.pyrnTraceback (most recent call last):rn File "createDomain.py", line 12, in rn import java.lang.SystemrnImportError: No module named java.lang.Systemrnrnrn我运行个小脚本,报错 怎么解决哇。。rnrn12行是import java.lang.System
ImportError: No module named os
我在配置Apache+mod_wsgi+Django的过程中,出现错误rn[Tue Sep 28 23:03:56 2010] [error] Traceback (most recent call last):rn[Tue Sep 28 23:03:56 2010] [error] File "E:/devspace/djtest/djtest/django.wsgi", line 1, in rn[Tue Sep 28 23:03:56 2010] [error] import sys, osrn[Tue Sep 28 23:03:56 2010] [error] ImportError: No module named osrnrn同样的工程,我在公司跑没问题,在家就出现这问题。rn有了解的告诉下,谢谢!
ImportError: No module named httplib
使用python编写脚本,提示ImportError: No module named httplib,在网上搜了下说是需要导入Django。我就在python官网上下了Django-1.6.1.tar.gz安装后,还是提示没有httplib,现在真不知道该怎么办了,请高手帮忙解决下
ImportError: No module named 请教
目录结构rnSrcrn |_MyApprn |_ MyApp.pyrn |_ MyFrame.pyrn |_ __init__.pyrnrn#MyApp.pyrnimport wxrnfrom MyApp.MyFrame import MyFrame rn#from MyFrame import MyFramernclass MyApp(wx.App):rn def __init__(self):rn wx.App.__init__(self)rn def OnInit(self):rn self.frame = MyFrame(None)rn self.frame.Show(True)rn self.SetTopWindow(self.frame) rn return Truernrnif __name__=="__main__":rn app = MyApp() rn app.MainLoop() rnrn运行时提示 ImportError: No module named iCMSApp.MainFramern请教下大家
ImportError: No module named fcntl
ImportError: No module named fcntl #fcntl.py #ImportError
ImportError: No module named naoqi
Traceback (most recent call last):rn File "", line 1, in rn import naoqirnImportError: No module named naoqirn有正在使用nao的朋友吗?
ImportError: No module named 'matplotlib'
![图片说明](https://img-ask.csdn.net/upload/201703/22/1490139637_755846.png)n![图片说明](https://img-ask.csdn.net/upload/201703/22/1490139654_86486.png)n怎么弄啊 我应该是安装matplotlid了的n怎么还说我没有
importError No module named multiarry
在terminal输入python后,执行命令报错:rn [code=python]rn import numpyrn import picklern import numpy.core.multiarrayrn data = pickle.load(open('Workspace/Ch5_Py_Mrjob_PegasosSVM/svmDat27','rb'))[/code]rn报错:rnTraceback (most recent call last):rn File "", line 1, in rn File "/home/hduser/anaconda2/lib/python2.7/pickle.py", line 1384, in loadrn return Unpickler(file).load()rn File "/home/hduser/anaconda2/lib/python2.7/pickle.py", line 864, in loadrn dispatch[key](self)rn File "/home/hduser/anaconda2/lib/python2.7/pickle.py", line 1096, in load_globalrn klass = self.find_class(module, name)rn File "/home/hduser/anaconda2/lib/python2.7/pickle.py", line 1130, in find_classrn __import__(module)rnImportError: No module named multiarrayrn rn [code=python]data = pickle.load(open('Workspace/Ch5_Py_Mrjob_PegasosSVM/svmDat27','r'))[/code]rn报错:rnTraceback (most recent call last):rn File "", line 1, in rn File "/home/hduser/anaconda2/lib/python2.7/pickle.py", line 1384, in loadrn return Unpickler(file).load()rn File "/home/hduser/anaconda2/lib/python2.7/pickle.py", line 864, in loadrn dispatch[key](self)rn File "/home/hduser/anaconda2/lib/python2.7/pickle.py", line 1096, in load_globalrn klass = self.find_class(module, name)rn File "/home/hduser/anaconda2/lib/python2.7/pickle.py", line 1130, in find_classrn __import__(module)rnImportError: No module named multiarrayrn rn [code=python] data = pickle.load(open('Workspace/Ch5_Py_Mrjob_PegasosSVM/svmDat27'))[/code]rn继续报错:rnTraceback (most recent call last):rn File "", line 1, in rn File "/home/hduser/anaconda2/lib/python2.7/pickle.py", line 1384, in loadrn return Unpickler(file).load()rn File "/home/hduser/anaconda2/lib/python2.7/pickle.py", line 864, in loadrn dispatch[key](self)rn File "/home/hduser/anaconda2/lib/python2.7/pickle.py", line 1096, in load_globalrn klass = self.find_class(module, name)rn File "/home/hduser/anaconda2/lib/python2.7/pickle.py", line 1130, in find_classrn __import__(module)rnImportError: No module named multiarrayrnrnrn在终端输入,感觉不存在编码问题;换了个机子用本机自带的python27运行报同样的错误!rnrn[color=#0000FF][b][size=16px]有没有哪位大神趟过相同的坑,恳请指教!至今没有解决问题~~~[/size][/b][/color]rnrn
ImportError: No module named pidlockfile
开启python的pyscada-daemon后,出现错误.错误详情:rn[img=https://img-bbs.csdn.net/upload/201603/21/1458541984_517128.png][/img]rnrn注:其中pyscada-daemon就是daemon,只是个别名
ImportError: No module named _md5
[color=#FF0000]安装python时,出现告警:[/color]rn*** WARNING: renaming "_hashlib" since importing it failed: build/lib.linux-i686-2.5/_hashlib.so: undefined symbol: EVP_MD_sizernrunning build_scriptsrnrn[color=#FF0000]尽管可正常安装,但是后续在安装setuptools-0.6c8时,会提示:[/color]baidu:/home/tt/software_zip # python ./ez_setup.py rnTraceback (most recent call last):rn File "./ez_setup.py", line 67, in rn except ImportError: from md5 import md5rn File "/usr/local/python2.5.4//lib/python2.5/md5.py", line 6, in rn from hashlib import md5rn File "/usr/local/python2.5.4//lib/python2.5/hashlib.py", line 133, in rn md5 = __get_builtin_constructor('md5')rn File "/usr/local/python2.5.4//lib/python2.5/hashlib.py", line 60, in __get_builtin_constructorrn import _md5rnImportError: No module named _md5rnrnopenssl已经试过了1.0版本,0.9.8版本;rnpython 已经试过了2.5.4/2.7.3/2.7.5/3.2 等版本,都有这个问题。rn求各位大神帮忙解答。rnlinux为SUSE
Windows10下Pycharm显示报错ImportError: No module named 'cv2.cv2'
Windows10下Pycharm显示报错ImportError: No module named 'cv2.cv2'该怎么解决?rn百度谷歌都只能找到ImportError: No module named 'cv2'的解决方案,但是找不到 'cv2.cv2'的解决方案rn该怎么办啊,求前辈们出手相助。rnrnrn具体报错如下所示:rnTraceback (most recent call last):rn File "C:\ProgramData\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 2961, in run_codern exec(code_obj, self.user_global_ns, self.user_ns)rn File "", line 1, in rn runfile('D:/机器学习/AnomalyDetection/AnomalyDetectionCVPR2018-master/Demo_GUI.py', wdir='D:/机器学习/AnomalyDetection/AnomalyDetectionCVPR2018-master')rn File "D:\pycharm\PyCharm 2018.2.1\helpers\pydev\_pydev_bundle\pydev_umd.py", line 194, in runfilern pydev_imports.execfile(filename, global_vars, local_vars) # execute the scriptrn File "D:\pycharm\PyCharm 2018.2.1\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfilern exec(compile(contents+"\n", file, 'exec'), glob, loc)rn File "D:/机器学习/AnomalyDetection/AnomalyDetectionCVPR2018-master/Demo_GUI.py", line 30, in rn import cv2rn File "D:\pycharm\PyCharm 2018.2.1\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 20, in do_importrn module = self._system_import(name, *args, **kwargs)rn File "C:\ProgramData\Anaconda3\lib\site-packages\cv2\__init__.py", line 3, in rn from .cv2 import *rn File "D:\pycharm\PyCharm 2018.2.1\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 20, in do_importrn module = self._system_import(name, *args, **kwargs)rnImportError: No module named 'cv2.cv2'rnrnrnPycharm里面看cv2的import引入正常rn求前辈们指点迷津!
tensorflow报错:ImportError:No module named 'tensorflow.python.platform'?
今天要打开tensorboard的时候出现报错:rn![图片说明](https://img-ask.csdn.net/upload/201906/02/1559476838_499887.png)rnrn然后试着用pythonrnimport tensorflow as tfrn检查了一下,还是同样的报错。rn所有用到import TensorFlow的程序都无法运行了。rnrn用网上的方法,添加PATH或者给tensorflow升级、重新安装后都是这样,不知道是为啥。
【初学者】ImportError: No module named 'Tkinter'
如题,我在windows.vista上安装了python3.3,一路顺利安装下来了。上面也能运行了hello world。rn但是当我运行如下代码的时候,提示找不到模块Tkinterrnrnfrom Tkinter import *rnroot = Tk()rnw = Label(root, text="Hello, world!")rnw.pack()rnroot.mainloop()rnrn----------F5执行后,错误信息如下-------------------------rn>>> rnTraceback (most recent call last):rn File "C:/Python33/temp/my_try.py", line 1, in rn from Tkinter import *rnImportError: No module named 'Tkinter'rn>>>
[D]ImportError:No module named _elemenpath
我在一个程序中使用了[color=#FF0000]lxml[/color],使用cx_Freeze打包程序(python setup.py build),运行程序时总是报[color=#FF0000]ImportError:No module named _elemenpath[/color]的错。rn请高手帮忙解决。rnrn---------------------------rnDouble行动:rn原帖分数:40rn帖子加分:40
安装xgboost过程中,报错ImportError: No module named numpy.distutils.core
安装xgboost过程中,在Python-package下执行python setup.py install命令时提示rnrnTraceback (most recent call last):rn File "setup.py", line 42, in rn url='https://github.com/dmlc/xgboost')rn File "F:\python2.7.6\lib\distutils\core.py", line 152, in setuprn dist.run_commands()rn File "F:\python2.7.6\lib\distutils\dist.py", line 953, in run_commandsrn self.run_command(cmd)rn File "F:\python2.7.6\lib\distutils\dist.py", line 972, in run_commandrn cmd_obj.run()rn File "build\bdist.win32\egg\setuptools\command\install.py", line 67, in runrn File "build\bdist.win32\egg\setuptools\command\install.py", line 117, in do_egg _installrn File "build\bdist.win32\egg\setuptools\command\easy_install.py", line 411, in r unrn File "build\bdist.win32\egg\setuptools\command\easy_install.py", line 655, in e asy_installrn File "build\bdist.win32\egg\setuptools\command\easy_install.py", line 702, in i nstall_itemrn File "build\bdist.win32\egg\setuptools\command\easy_install.py", line 747, in p rocess_distributionrn File "build\bdist.win32\egg\pkg_resources\__init__.py", line 846, in resolvern File "build\bdist.win32\egg\pkg_resources\__init__.py", line 1118, in best_matc hrn File "build\bdist.win32\egg\pkg_resources\__init__.py", line 1130, in obtainrn File "build\bdist.win32\egg\setuptools\command\easy_install.py", line 674, in e asy_installrn File "build\bdist.win32\egg\setuptools\command\easy_install.py", line 700, in i nstall_itemrn File "build\bdist.win32\egg\setuptools\command\easy_install.py", line 881, in i nstall_eggsrn File "build\bdist.win32\egg\setuptools\command\easy_install.py", line 1120, in build_and_installrn File "build\bdist.win32\egg\setuptools\command\easy_install.py", line 1106, in run_setuprn File "build\bdist.win32\egg\setuptools\sandbox.py", line 258, in run_setuprn File "F:\python2.7.6\lib\contextlib.py", line 35, in __exit__rn self.gen.throw(type, value, traceback)rn File "build\bdist.win32\egg\setuptools\sandbox.py", line 198, in setup_contextrn File "F:\python2.7.6\lib\contextlib.py", line 35, in __exit__rn self.gen.throw(type, value, traceback)rn File "build\bdist.win32\egg\setuptools\sandbox.py", line 169, in save_modulesrn File "build\bdist.win32\egg\setuptools\sandbox.py", line 144, in resumern File "build\bdist.win32\egg\setuptools\sandbox.py", line 157, in save_modulesrn File "build\bdist.win32\egg\setuptools\sandbox.py", line 198, in setup_contextrn File "build\bdist.win32\egg\setuptools\sandbox.py", line 255, in run_setuprn File "build\bdist.win32\egg\setuptools\sandbox.py", line 285, in runrn File "build\bdist.win32\egg\setuptools\sandbox.py", line 253, in runnerrn File "build\bdist.win32\egg\setuptools\sandbox.py", line 47, in _execfilern File "c:\users\admini~1\appdata\local\temp\easy_install-pxqv7f\scipy-0.19.0\set up.py", line 416, in rnrn File "c:\users\admini~1\appdata\local\temp\easy_install-pxqv7f\scipy-0.19.0\set up.py", line 396, in setup_packagernrnImportError: No module named numpy.distutils.corern
win7安装CPU TensorFlow报错:ImportError:No module named '_pywrap_tensorflow_internal'
win7下安装TensorFlow报错,安装的CPU版本的TensorFlow。rn执行步骤依次为:rn--------------------------------------------------------------rn安装 Anaconda3-4.2.0-Windows-x86_64.exerncmdrncd Program Files\Anaconda3\Scripts rnpip install tensorflowrnpythonrnimport tensorflow as tfrn--------------------------------------------------------------rn报错信息是:ImportError: No module named '_pywrap_tensorflow_internal'rn[img=https://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/003/onion/18.gif][/img][img=https://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/003/onion/18.gif][/img][img=https://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/003/onion/18.gif][/img]rnrnrnrnrnrn
mysql-python安装以后,仍然报错:ImportError: No module named mysqlDB
平台是debian7.7 rnpython用的是2.7.3rnrn用pip安装mysql-python显示成功rn[code=text](youngTree)junjielee@debian:~$ sudo pip install mysql-pythonrnDownloading/unpacking mysql-pythonrn Downloading MySQL-python-1.2.5.zip (108kB): 108kB downloadedrn Running setup.py (path:/tmp/pip_build_root/mysql-python/setup.py) egg_info for package mysql-pythonrn rnInstalling collected packages: mysql-pythonrn Running setup.py install for mysql-pythonrn building '_mysql' extensionrn gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -Dversion_info=(1,2,5,'final',1) -D__version__=1.2.5 -I/usr/include/mysql -I/usr/include/python2.7 -c _mysql.c -o build/temp.linux-x86_64-2.7/_mysql.o -DBIG_JOINS=1 -fno-strict-aliasing -grn In file included from _mysql.c:44:0:rn /usr/include/mysql/my_config.h:422:0: warning: "HAVE_WCSCOLL" redefined [enabled by default]rn In file included from /usr/include/python2.7/Python.h:8:0,rn from _mysql.c:29:rn /usr/include/python2.7/pyconfig.h:890:0: note: this is the location of the previous definitionrn gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro build/temp.linux-x86_64-2.7/_mysql.o -L/usr/lib/x86_64-linux-gnu -lmysqlclient_r -lpthread -lz -lm -lrt -ldl -o build/lib.linux-x86_64-2.7/_mysql.sorn rnSuccessfully installed mysql-pythonrnCleaning up...[/code]rnrn我的dist-packages已经有两个文件夹:MYSQLdb和MySQL_python-1.2.5-py2.7.egg-infornrn现在的问题是,我在python交互界面,import MYSQLdb显示错误如下:rn>>> import mysqlDBrnTraceback (most recent call last):rn File "", line 1, in rnImportError: No module named mysqlDBrn
关于pycharm找不到已经安装的module ImportError: No module named问题的解决方案
最近在整理Python和Pycharm相关配置的时候,遇到了一些配置上的问题,这里给大家做一下分享整理。首先,自己安装了一个python3.6(在官网上安装的,当前最新版本是Python 3.7),下载地址如下:https://www.python.org/downloads/windows/然后按照安装向导,一点点安装即可。安装目录选择为:C:\Users\yanyan\AppData\Loca...
关于ImportError: No module named 'pyodbc'的问题
在doc命令下 pip install pyodbc已经安装成功,但在pycharm下import pyodbc后,一直报错ImportError: No module named 'pyodbc',需要链接的是sql2008,同理安装了pymssql也一样,是否是安装的不够完整?一直报找不到该模块,版本是3.5rn[img=https://img-bbs.csdn.net/upload/201807/06/1530845483_82253.png][/img]
java调用python文件报错ImportError: No module named urllib
python代码rnrn# -*- coding: utf-8 -*-rnimport urllibrnprint "sdf"rnrnjava代码rnrnimport org.python.util.PythonInterpreter; rnimport org.python.core.*; rnrnrnpublic class cs rnrn public static void main(String[] args) rn // TODO Auto-generated method stubrn PythonInterpreter interp = new PythonInterpreter();rn interp.execfile("D:\\lm.py");rn rn rnrnrn实在不知道为什么各位大哥大姐帮帮忙吧!!
python提示ImportError: No module named Image
我ubuntu安装了PIL,在python环境下输入:import Image时没有提示错误,可以运行.n但是我电脑同时安装了virtualenv,当在venv环境下输入import Image时会提示ImportError: No module named Image.n我想可能是虚拟环境下没有PIL 的问题,于是我又在venv环境下安装Python Imaging Library 1.7,然后又输入了一遍sudo apt-get install python-imaging.n没想到在venv环境下进行来上述两步后,再输入import Image时仍然提示同样的错误.n都装过了为什么还是提示没有Image呢?哪位老师指点一下,谢谢.
python 引入的错误 ImportError: No module named misc.ExtendAction
执行下边的脚本文件 出现的问题rnrnrnD:\qooxdoo-1.6-sdk\framework>generate.py -buildrnrn[color=#000080]Traceback (most recent call last):rn File "D:\qooxdoo-1.6-sdk\tool\bin\generator.py", line 25, in rn from misc.ExtendAction import ExtendActionrnImportError: No module named misc.ExtendAction[/color]rnrnrn大概意思是找不到misc.ExtendAction 这个东西rnrn但实际上 ExtendAction.py 这个文件是存在的..只是在运行的时候没有找到rnrn这个问题怎么解决rnrn各位达人,本人没学过python..只是遇到了这个问题..勿喷...
解决这个错误问题:importerror no module named fcntl
解决这个错误问题:importerror no module named fcntl。 解压后,将fcntl.py文件放到PYTHONPATH路径即可,我是放到了Python27\Lib目录下。
Ceph启动失败: ImportError: No module named rados
三台机器,每台兼任mds和osd,其中一台兼任mon,初始化成功(倒腾了一整天。。。)rnrn然后启动的时候失败,信息如下。。。rnrn# /etc/init.d/ceph -a startrn=== mon.00 === rnStarting Ceph mon.00 on ceph00...already runningrn=== mds.00 === rnStarting Ceph mds.00 on ceph00...already runningrn=== mds.01 === rnStarting Ceph mds.01 on ceph01...already runningrn=== mds.02 === rnStarting Ceph mds.02 on ceph02...already runningrn=== osd.00 === rnMounting Btrfs on ceph00:/data/osd.00rnScanning for Btrfs filesystemsrnTraceback (most recent call last):rn File "/usr/local/ceph/bin/ceph", line 56, in rn import radosrnImportError: No module named radosrnfailed: 'timeout 10 /usr/local/ceph/bin/ceph --name=osd.00 --keyring=/data/osd.00/keyring osd crush create-or-move -- 00 0.02 root=default host=ceph00 'rnroot@ceph00:~/.ssh# /etc/init.d/ceph -a startrn=== mon.00 === rnStarting Ceph mon.00 on ceph00...already runningrn=== mds.00 === rnStarting Ceph mds.00 on ceph00...already runningrn=== mds.01 === rnStarting Ceph mds.01 on ceph01...already runningrn=== mds.02 === rnStarting Ceph mds.02 on ceph02...already runningrn=== osd.00 === rnMounting Btrfs on ceph00:/data/osd.00rnScanning for Btrfs filesystemsrnTraceback (most recent call last):rn File "/usr/local/ceph/bin/ceph", line 56, in rn import radosrnImportError: No module named radosrnfailed: 'timeout 10 /usr/local/ceph/bin/ceph --name=osd.00 --keyring=/data/osd.00/keyring osd crush create-or-move -- 00 0.02 root=default host=ceph00 'rnrn我是用ceph源码编译安装的,我用lsmod命令查看也确实没有rados模块,但是又查不到怎么安装rados模块。。rnrn求助。。。
django创建model出错: ImportError: No module named
环境:Django-1.9.1-py2.7 + centos 3.10.0 + mysql5.0rn教程:http://www.runoob.com/django/django-model.htmlrnrn我按着教程走,创建了HelloWorld的proj,之后创建TestModel的app,这时候我的目录是这样的:rn[root@VM_9_170_centos HelloWorld]# treern.rn|-- HelloWorldrn| |-- __init__.pyrn| |-- __init__.pycrn| |-- db.sqlite3rn| |-- settings.pyrn| |-- settings.pycrn| |-- templatesrn| | |-- base.htmlrn| | `-- hello.htmlrn| |-- urls.pyrn| |-- urls.pycrn| |-- view.pyrn| |-- view.pycrn| |-- wsgi.pyrn| `-- wsgi.pycrn|-- TestModelrn| |-- __init__.pyrn| |-- __init__.pycrn| |-- admin.pyrn| |-- admin.pycrn| |-- apps.pyrn| |-- migrationsrn| | `-- __init__.pyrn| |-- models.pyrn| |-- models.pycrn| |-- tests.pyrn| `-- views.pyrn|-- db.sqlite3rn`-- manage.pyrnrnHelloWorld/settings.py:rnINSTALLED_APPS = [rn 'django.contrib.admin',rn 'django.contrib.auth',rn 'django.contrib.contenttypes',rn 'django.contrib.sessions',rn 'django.contrib.messages',rn 'django.contrib.staticfiles',rn 'TestModel',rn]rnrnTestModel/models.pyrnclass Test(models.Model):rn name = models.CharField(max_length=20)rnrn我执行命令: python manage.py syncdbrn报错:rnUnknown command: 'syncdb'rnType 'manage.py help' for usage.rnrn我怀疑跟教程目录不一样,把TestModel mv 到HelloWorld里:rnmv TestModel/ HelloWorld/rnrn重新执行: python manage.py syncdbrn报错:rn[root@VM_9_170_centos HelloWorld]# python manage.py syncdbrnTraceback (most recent call last):rn File "manage.py", line 9, in rn execute_from_command_line(sys.argv)rn File "/usr/lib/python2.7/site-packages/Django-1.9.1-py2.7.egg/django/core/management/__init__.py", line 353, in execute_from_command_linern utility.execute()rn File "/usr/lib/python2.7/site-packages/Django-1.9.1-py2.7.egg/django/core/management/__init__.py", line 327, in executern django.setup()rn File "/usr/lib/python2.7/site-packages/Django-1.9.1-py2.7.egg/django/__init__.py", line 18, in setuprn apps.populate(settings.INSTALLED_APPS)rn File "/usr/lib/python2.7/site-packages/Django-1.9.1-py2.7.egg/django/apps/registry.py", line 85, in populatern app_config = AppConfig.create(entry)rn File "/usr/lib/python2.7/site-packages/Django-1.9.1-py2.7.egg/django/apps/config.py", line 90, in creatern module = import_module(entry)rn File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in import_modulern __import__(name)rnImportError: No module named TestModelrnrn网上看了很多,基本都是版本问题,但是我这里INSTALLED_APPS应该没错。求助高手解答。rn
ImportError: No module named 'config' 怎么解决?
[img=https://img-bbs.csdn.net/upload/201602/26/1456468578_162420.jpg][/img]rnrnImportError: No module named 'config' 怎么解决?
之前可以运行,现在ImportError: No module named cv2 报错
在尝试了网上各种修改路径方法以及配置环境的方法都依然有报错后自己想了想。 把Python35/Lib/site-packages中的cv2......一串名字改成了cv2 当时想这个东西类型是Module,又66099KB,应该是cv2的模板,既然找不到就给你改个名字。(虽然说了不能乱改文件名称,但尝试了一天真的是绝望了好吧),然后就不报错了    ...
java调python,报错ImportError: No module named cx_Oracle
通过java调python,报错:rnException in thread "main" Traceback (most recent call last):rn File "Test.py", line 23, in rn import cx_OraclernImportError: No module named cx_Oraclern---------------------------------------------------------rnrn我已经安装了cx_Oracle,而且python脚本在python中可以正常运行,java调时就报错。rnrnjava:调用代码:rnPythonInterpreter interpreter = new PythonInterpreter(); rn interpreter.execfile("Test.py");rn //interpreter.execfile("/home/itvsoap/Test.py");rn PyFunction func = (PyFunction)interpreter.get("deal",PyFunction.class); rn PyObject pyobj = func.__call__();rn System.out.println(pyobj.toString());rnrnpython脚本:rnimport cx_Oraclerndef deal(self=None):rn try:rn conn= cx_Oracle.connect('pin1','pin1','10.163.201.241:1521/brm')rn cur = conn.cursor()rn o_rs=cur.var(cx_Oracle.CURSOR)rn cur.callproc('p_diy_test_qr',[o_rs])rn for rs in o_rs.getvalue():rn print rs[0],rs[1]rn except Exception ,e:rn print u'\u6570\u636e\u5e93\u5f02\u5e38:',str(e)rn finally: rn if cur: rn cur.close()rnrnif __name__ == "__main__":rn deal()
ImportError: No module named _tkinter和tk安装时缺乏依赖关系的解决
学习Python过程中使用到了turtle模块,import turtle发现并没有安装tk,但是安装却始终缺少依赖关系,于是又开始了一段学习之路. 标准解法 $ sudo apt-get install python-tk (download&install tk) 大部分人看到这里应该问题已经解决了,但是如果安装时出现缺乏一大堆依赖关系的问题,请往下看! 然...
安装 Twisted 解决ImportError No module named zope.interface错误
安装 Twisted 解决ImportError No module named zope.interface错误
【环境搭建系列】pycharm中报错:no module named numpy
1、环境描述 安装了anaconda3,并且在jupyter notebook中,可以调用numpy。 但是在pycharm中就报错:no module named numpy 2、解决方法 这是因为pycharm默认的python没有选择anaconda自带的python,修改file--settings--project interprete为anaconda安装路径下的pyt...
关于PyCharm中的no module named ~的解决办法
PyCharm小白,只是为了方便以后学习,故把相关内容记录一下: 在创建相关项目工程之后,若使用到一个库,比如requests库,或numpy库,若出现no module named ~类的错误,可以在下图中所示的选项中进行修改: 在File中选择Setting for New Projects: 然后选择Project Interpreter,并点击右边的加号进行库的查找和添加 ...
终端中安装了pygame,但在pycharm中出现"no module named pygame"?
在终端中安装成功pygame后,在pycharm中导入pygame模块时候,仍然出现"no module named pygame"? 这是因为还没在pycharm中安装pygame,具体安装步骤,可参考博客:   https://blog.csdn.net/weixin_44236428/article/details/85922933      最后在pygame旁边会出现"installin...
No module named ***
初学。rn Eclipse + PyDev 环境下,对一个项目debug、运行时,rn报了N多个 “No module named ***”。。。rnrn我自己创建一个hello world 的程序是可以调试、运行的,但多个*.py 在一起时,就出错。rnrn这些 modules 如何加载进来? 不能一个一个加载吧,我这有几十个 modules 缺失。。。rnrn请指点一下,谢谢。 分数不多,意思一下
相关热词 c# stream 复制 android c# c#监测窗口句柄 c# md5 引用 c# 判断tabtip 自己写个浏览器程序c# c# 字符串变成整数数组 c#语言编程写出一个方法 c# 转盘抽奖 c#选中treeview