ironpython3 icon indicating copy to clipboard operation
ironpython3 copied to clipboard

IronPython.Runtime.Exceptions.ImportException: 'No module named 'pygame''

Open Michael-Tang-2009 opened this issue 2 years ago • 3 comments

Prerequisites

The issue tracker is used to report bugs and request new features, NOT to ask questions.

Questions should be posted in Discussions or to the users mailing list which can be accessed at https://ironpython.groups.io/g/users.

  • [x] Are you running the latest version?
  • [ ] Are you reporting to the correct repository?
  • [ ] Did you perform a cursory search?

Description

I downloaded the pygame package using the pip virtual environment, and copied the entire Lib folder generated by the pip virtual environment to the Debug folder and referenced it in the program. However, why would an error be reported?

001

Steps to Reproduce

  1. Install Ironpython 3.4 in nuget package manager
  2. Run "python - m venv env" to create a python virtual environment
  3. Run "env Scripts activate. bat" to enable the Python virtual environment
  4. Run "pip install pygame" to download the latest package for pygame
  5. Copy the Lib folder under the env folder created by pip to the project output path

Versions

IronPython 3.4 Python 3.9 (64-bit)

Michael-Tang-2009 avatar Mar 19 '23 10:03 Michael-Tang-2009

The ImportError you're seeing occurs when the import system fails to find the module (usually because system paths are not properly set). However, pygame uses of C extensions and so won't work with IronPython.

slozier avatar Mar 27 '23 13:03 slozier

So you means that IronPython is not support 'pygame' lib?

Michael-Tang-2009 avatar Apr 02 '23 11:04 Michael-Tang-2009