IronLanguages / ironpython3

Implementation of Python 3.x for .NET Framework that is built on top of the Dynamic Language Runtime.
Apache License 2.0
2.48k stars 287 forks source link

IronPython.Runtime.Exceptions.ImportException: 'No module named 'typing'' #1676

Closed fran-vera closed 1 year ago

fran-vera commented 1 year ago

Prerequisites

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

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

Description

I created an .net application with c# and I wanted to run a python script with but, in my script I was using mongo, so when import the library and run de app, the following error appears: IronPython.Runtime.Exceptions.ImportException: 'No module named 'typing'', it's only with the library import pymongo, becuase I worked with other libraries and without libraries and the app works fine.

Steps to Reproduce

  1. [Run .Net App]
  2. [Run script in python]

Expected behavior: [What you expected to happen] Run without any exception.

Actual behavior: [What actually happened] Visual Studio launch an error.

Versions

I installed the v3.4.0 in NuGet or I installed the latest version in the package manage in visual studio community

slozier commented 1 year ago

The typing module was added in Python 3.5 so you'll have to find a backport of it (I think there's one on PyPI) if you want to use it in 3.4.