-
Notifications
You must be signed in to change notification settings - Fork 187
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
PyCall only loads during the session in which it's built #173
Comments
Other info that may be useful:
|
@swt30, I should also really unset it and other environment variables after It looks like the right thing is for me not to use the environment variable at all, but rather to use |
Okay, I've pushed a patch that uses |
Not yet, but I'm reinstalling the virtual environment with an updated version of virtualenvwrapper to see if that changes things. |
No luck, I'm afraid! Same behaviour as before. |
Does setting |
Still no, unfortunately. The plot just thickened: julia> using PyCall
WARNING: error initializing module PyCall:
ReadOnlyMemoryError() This is in the same place, using a Python 2 virtual environment instead of Python 3. I don't have enough debugging skill to look much more deeply into where the error is coming from, but I'm happy to try any other suggestions to figure out what's screwed up with my virtual environment. |
For some reason, I am now getting only the ReadOnlyMemoryError with any Python, whether it's the system version or either virtual environment. Still in the same place (after the session restart). I'm confused too. |
Rebuilt Julia and now the error is back to the first one: |
@swt30, does the error persist if you manually set the |
It does. |
I'm on Julia master; would it be worthwhile bisecting on Julia to see if this behaviour starts showing up with a specific Julia commit? Could 46e60f3 have exposed a Julia bug? |
Can verify that the behaviour is still around for me on v0.3.11, but not on another machine. I suppose something strange is going on with virtualenvwrapper. I'll see what happens if I disable it. |
That is so bizarre. |
No change upon deactivating virtualenvwrapper - whether using the system python or a virtual environment of any kind, it's either a |
As of 493b3f0, this is fixed in my Python 2.7. The error still persists on Python 3.4. It's apparently coming from line 72 in pyinit.jl. |
PyCObject was deprecated in Python 2.7 and removed somewhere in 3.x. So the fallback to CObject at pyinit line 74 is failing. Do we need the new PyCapsule API here instead? |
... but then it still comes back to the fact that ctypes is failing to load unless PyCall was built that session. It's just that python 2.7 allows the fallback to PyCObject, while 3.4 doesn't. I think this is the same as #178. Closing in favour of that until I get a better handle on the situation.
|
for reference, this issue on another project notes a similar problem using Python's C API on Ubuntu, relating to symbol resolution on library load. They end up putting in another |
See #167 (comment)
deps.jl contains:
The text was updated successfully, but these errors were encountered: