-
Notifications
You must be signed in to change notification settings - Fork 70
Importing python modules failed from the specified python #252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
You need to set those env vars before you import PythonCall, and they need to be set every time - so if you restart Julia you need to set them again. It's usual to set these in your Julia startup file or your shell startup file if you're coming from bash/zsh/etc. |
Both |
Setting the following lines into the
julia> using PythonCall
julia> ts = pyimport("transformers")
Python _LazyModule: <module 'transformers' from 'C:\\Users\\Shayan\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\transformers\\__init__.py'> Thanks. Please note to mention this precisely in the documentation as well. |
You're welcome. Will do! |
Uh oh!
There was an error while loading. Please reload this page.
Today I installed the latest version of
PythonCall.jl
(v0.9.10) package and started with:Then I closed the Julia session and started a new one to continue. Then I failed to import the
numpy
package viapyimport
:Also, I tried setting the path to the directory rather than the executable Python:
But, still, I couldn't import
numpy
. Note that I made sure that thenumpy
is installed in the specified environment:The text was updated successfully, but these errors were encountered: