ariovistus / pyd

Interoperability between Python and D
MIT License
157 stars 32 forks source link

Not apparent on how to use py_import to import packages installed by pip #149

Open TimCoraxAudio opened 3 years ago

TimCoraxAudio commented 3 years ago

It looks as though you can set your py lib preferences in pyd_get_env_set_text.py but I can't quite figure out how to do it properly. I'm trying to import pygeo to use in an embedded situation but can't import it. Any help here?

mw66 commented 3 years ago

Can you avoid to import many different Python files into D?

I find the easiest way to use pyd is to write a single wrapper .py file which import every needed Python packages purely on Python side, (and act as a Python server).

Then D only use this single wrapper.py, which makes the life much easier.

HTH.