python pygame中怎么安装?我安装后好像还是引用不了?

lkf181 2018-08-16 01:00:54
我下载了gameobjects-0.0.3.win32.exe 双击安装后还需要用pip怎么操作一下吗?
说是只支持python2 我特意下载的 python-2.7.15.msi 并且将pycharm调整到python2
代码如下但还是报错:

# coding: utf-8
from gameobjects.vector2 import *
A = (10.0, 20.0)
B = (30.0, 35.0)
AB = Vector2.from_points(A, B)
print "Vector AB is", AB
print "AB * 2 is", AB * 2
print "AB / 2 is", AB / 2
print "AB + (–10, 5) is", AB + (-10, 5)
print "Magnitude of AB is", AB.get_magnitude()
print "AB normalized is", AB.get_normalized()

D:\python\Lkfpygame\venv1\Scripts\python.exe D:/python/Lkfpygame/Test1/Vector2.py
Traceback (most recent call last):
File "D:/python/Lkfpygame/Test1/Vector2.py", line 3, in <module>
import gameobjects
ImportError: No module named gameobjects

Process finished with exit code 1
...全文
711 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
黑卡米 2019-06-05
  • 打赏
  • 举报
回复
引用 1 楼 lkf181 的回复:
自己摸索已经解决了
解决办法你说出来啊
lkf181 2018-08-24
  • 打赏
  • 举报
回复
自己摸索已经解决了

456

社区成员

发帖
与我相关
我的任务
社区描述
其它游戏引擎
社区管理员
  • 其它游戏引擎社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧