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.51k stars 290 forks source link

System.MissingMemberException: "'module' object has no attribute 'add_dll_directory'" #1621

Open chuongmep opened 1 year ago

chuongmep 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

That is a problem when I try use add library numpy,pandas with python from 3.8 to 3.10. Whether we have any way to fix this problem?

import sys
sys.path.append(r"C:\Users\chuon\AppData\Local\Programs\Python\Python310\Lib\site-packages")
import numpy as np

same problem with : https://stackoverflow.com/questions/74635647/c-sharp-ironpython-system-missingmemberexception-module-object-has-no-attrib

Steps to Reproduce

  1. [First Step]
  2. [Second Step]
  3. [and so on...]

Expected behavior: [What you expected to happen]

Actual behavior: [What actually happened]

Versions

Ironpython 3.4.0

slozier commented 1 year ago

Unfortunately both numpy and pandas are C extension modules which are not supported. As for the System.MissingMemberException, the os.add_dll_directory method was only added in Python 3.8.

chuongmep commented 1 year ago

@slozier Whether we have any plan for that ? Because numpy and pandas is common library.

slozier commented 1 year ago

Unfortunately, no short term plans. There's the Ironclad project which I'd like to revive at some point, however there are still many core features that need to be implemented so I haven't time to look at it.

GeorgeS2019 commented 1 year ago

@slozier Could you update the IronClad for Ironpython3 status. It seems U have made lots of progress lately C Extension support through Ironclad for Ironpython3: March2023 Update

slozier commented 1 year ago

@GeorgeS2019 I am just playing around with it trying to get it to compile with the Python 3.4.4 codebase. Even if I do get it compiling I am not sure anything will work with it as there have been a number of core changes going from 2 to 3 that will likely require a lot of work. In any case, I do not have any sort of timeline for it...

GeorgeS2019 commented 1 year ago

@slozier ,

Thx for sharing.

Any chance of listing these challenges in concrete ways and outsource to others.

Thx for attempting this herculean task

GeorgeS2019 commented 1 year ago

@slozier

The fact that Changes for Ironclad happens, means the attempt will continue.

Thanx

GeorgeS2019 commented 1 year ago

Progress continue...update May 2033 😊

chuongmep commented 1 year ago

Nice ! lucky when I hear team have update for this <3

GeorgeS2019 commented 10 months ago

Confrm ironclad 3 resume. Dec 2023

chuongmep commented 10 months ago

@GeorgeS2019 your meaning is feature supported ?

GeorgeS2019 commented 10 months ago

https://github.com/IronLanguages/ironclad/discussions/18