安装后,PYTMX无法导入

时间:2019-05-20 00:43:44

标签: python module pip pytmx

我尝试查看有关此内容的其他帖子,但没有任何效果,或者我无法正确理解。我刚刚卸载并重新安装此消息

C:\Users\chris>pip uninstall pytmx
Uninstalling PyTMX-3.21.7:
  Would remove:
    d:\users\chris\appdata\local\programs\python\python37\lib\site-packages\pytmx-3.21.7-py3.7.egg-info
    d:\users\chris\appdata\local\programs\python\python37\lib\site-packages\pytmx\*
Proceed (y/n)? y
  Successfully uninstalled PyTMX-3.21.7

C:\Users\chris>python -m pip install pytmx
Collecting pytmx
  Using cached https://files.pythonhosted.org/packages/44/1c/be28e849a7dfcf992c91a55d7efd78f850aad25dcb483bf353b436fb338f/PyTMX-3.21.7.tar.gz
Requirement already satisfied: six in d:\users\chris\appdata\local\programs\python\python37\lib\site-packages (from pytmx) (1.12.0)
Installing collected packages: pytmx
  Running setup.py install for pytmx ... done
Successfully installed pytmx-3.21.7

C:\Users\chris>

,并且在我的代码中使用它时仍然收到此消息:

pygame 1.9.4
Hello from the pygame community. https://www.pygame.org/contribute.html
Traceback (most recent call last):
  File "C:\Users\chris\Desktop\Passion Project Files\Passion-Project.py", line 5, in <module>
    from pytmx.util_pygame import load_pygame
ModuleNotFoundError: No module named 'pytmx'

我不知道该怎么办。我已经尝试过虚拟环境,但仍然没有任何效果,并且sudo无法正常工作。我还从多个人那里看到我无论如何都不应该使用sudo。

0 个答案:

没有答案