简体   繁体   English

导入错误:模块使用python27.dll与此版本的python冲突

[英]Import error: Module use of python27.dll conflicts with this version of python

import sys sys.path.insert(1,"C:/Users/ravir_000/Desktop/python_CS105/python_CS105/Python27/Lib/site-packages") import math import random import pygame from pygame.locals import * import sys sys.path.insert(1,“C:/ Users / ravir_000 / Desktop / python_CS105 / python_CS105 / Python27 / Lib / site-packages”)从pygame.locals import导入数学导入随机导入pygame *

pygame.init() pygame.init()

How do you get rid of the error? 你如何摆脱这个错误? Import error: Module use of python27.dll conflicts with this version of python. 导入错误:模块使用python27.dll与此版本的python冲突。 I was working on this a few hours ago and it was working fine. 几个小时前我正在研究这个问题并且工作正常。 When I got into class it started giving me this error. 当我上课时,它开始给我这个错误。 I have tried to install/reinstall pyscripter and pygame but it still does not work. 我试图安装/重新安装pyscripter和pygame但它仍然无法正常工作。 I am sure that my path to pygame is correct. 我确信我的pygame之路是正确的。 Any ideas? 有任何想法吗?

You are trying to use a pygame distribution that is for python 2.7 with a different version of python. 您正在尝试使用python 2.7的pygame发行版,其中包含不同版本的python。

You should download and use the appropriate version. 您应该下载并使用适当的版本。

If installed correctly, there will be no need for sys.path.insert . 如果安装正确,则不需要sys.path.insert

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM