Subscribe to this thread
Home - General / All posts - IronPython - importing external libraries
julmou29 post(s)
#12-Feb-24 04:42

Hi,

So, I've been successfully using IronPython with the Standard Python Library, using modules such as json or urllib2. This line of code allows me to import the standard modules:

#python

import sys

sys.path.extend(['C:\\Program Files\\IronPython 2.7\\lib', 'C:\\Program Files\\IronPython 2.7\\lib\\site-packages'])

And then, I can just import the modules, and use them as normal:

#python

import json

import urllib2

Now, it still feels pretty limited in some way.

Is there a way we could also be using some external libraries, such as pandas, requests, or even fiona?

Thanks a lot for your help.

rk
635 post(s)
online
#12-Feb-24 10:00

I believe we cannot use pandas or fiona with IronPython.

I have IronPython 3.4.1 and I could install requests 2.21.0.

Apparently 2.7 was supported even longer than 3.4 by requests.

https://requests.readthedocs.io/en/latest/community/updates/#id6

Manifold User Community Use Agreement Copyright (C) 2007-2021 Manifold Software Limited. All rights reserved.