howto import downloaded python modules #31
pmeyerson
started this conversation in
Usage Discussions
Replies: 1 comment
-
@pmeyerson I think this is to be expected. When embedded the Python runtime knows little about the process it runs in (I.e. it doesn't know about the process args unless you tell it). There are various ways to get module imports to work. I believe this is the idiomatic one: (I personally tend to just append the path to my modules to |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm finding that to import non-system python modules I need to set
PYTHONPATH
to./venv/lib/python3.7/site-packages
prior to executing my go module, otherwise I get'package name' not found
on below.IE python.PyRun_SimpleString(`import foo
foo.x()
print("it worked")`)
Is this true for everyone else or is there something weird about my python3.7 setup?
I'd be happy to submit readme update if its not just me.
Running on osx (not M1)
Beta Was this translation helpful? Give feedback.
All reactions