-
Notifications
You must be signed in to change notification settings - Fork 88
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
Cannot import PyPlot #140
Comments
See also JuliaPy/PyCall.jl#65 |
As suggested by the other thread, I also tried setting |
Same issue here, both with Julia 0.3.7 and 0.4. I also looked into the other thread, but as I tried to replicate @cberzan errors, I did not get any. And I can do
without obtaining errors. It gets weirder... ¿does PyPlot try to use python2.7 as its matplotlib interpreter? |
PyPlot (via PyCall), uses whatever Try
if you aren't sure which Python Julia is finding. If you have multiple Pythons installed, it may not be the one you think. |
Can you suggest a temporary workaround? I have a lot of analysis code built around I'm running the python binary I expect to (python 2.7) and I downgraded to
|
It's hard to debug remotely, unfortunately. My best guess is that it's some kind of Python-path snafu, where the pip-installed Python packages are getting confused with the Ubuntu-installed Python packages unless you have the environment set up correctly. Running Are you sure you don't have more than one Python 2.7 installed, and PyCall is using the wrong one? Try setting |
I know it's tricky to help remotely, and I appreciate the help. Setting
|
Where is pip installing things? Maybe try to set your |
Aha, I do indeed have two sets of libraries, as you said. One is in Setting
|
Any ideas? I have removed the libraries from |
PYTHONPATH is the path of the Python packages, not libpython |
For the time being I've given up on using PyPlot in julia and have developed workarounds using other languages. That's too bad, though, because I like julia a lot otherwise. So if anyone out there can think of ideas for even digging into what is wrong, it would be helpful. I'll re-summarize. I only one place where I can
Setting |
I am having this same issue, and the LD_PRELOAD trick isn't working for me. I can install numpy 1.7.0 and matplotlib 1.4.1 and import them using PyCall, but then I run into a different problem: when I use
and no plot appears (I can use savefig though). It hurts not being able to use PyPlot.jl in Jupyter. Has anyone discovered anything new regarding this issue? |
@kersulis, to get inline plots, you need to use the PyPlot module, not |
My apologies for the confusion, I should have referenced this PyCall issue. I commented here because it seems like this is where the discussion about What I meant about inline plotting is that I am running |
I also have the exact same issue as the original reporter, running on Ubuntu 15.04, with both Julia 0.4.0-rc1 binaries and with 0.3.10 from the Ubuntu repo. There is only one Python installation (the default Ubuntu 15.04) and running ";python --version" from Julia gives "Python 2.7.9". Symptoms
Things I have tried
This has been the case since around one week for me and has been a total blocking issue for any PyPlot plotting. As a workaround I have done some limited plotting with Winston. I really hope we can track down this issue. |
Have you tried |
Hi Steven, thanks for the help, here is the output.
On further digging,
The really odd thing is that |
See JuliaPy/PyCall.jl#65: some versions of numpy seem to get confused by the |
Thanks a lot Steven for your help, I will try (first attempts at copying Constantin's solution did not succeed for me), with LD_PRELOAD set I obtain errors on
As my machine is a pretty standard install, this issue would affect all Ubuntu 15.04 users on a 64 bit machines using PyPlot, which makes this issue reasonably important in light of the upcoming 0.4 release and new users trying out Julia/PyPlot. |
@nowozin, that sounds like JuliaPy/PyCall.jl#189, which I just fixed. Try a |
Yes, the error reverts to the
and similarly for the IPython notebook server this works:
Thank you for your help tracking this down. |
Hi, I may have a related issue on 12.04, with Julia 0.4.0-rc2 and do not have a solution yet...
However, I am able to run directly in Python (Anaconda):
This had worked fine two months ago on Julia dev+5933 and latest packages at the time. |
@dehann, seems to be a dup of JuliaPy/PyCall.jl#65 as above: a conflict between Julia's openblas/lapack library and the one Numpy is linking. See the LD_PRELOAD workaround mentioned there. |
You can use Miniconda via the Conda.jl package now. Just do:
and it should install and use Does this fix the Numpy conflict? |
@stevengj : I'm experiencing the same problems with x86-64 Linux binary of julia-0.4.0-rc3. The suggestion above doesn't work.
|
@johnfgibson, did you try preloading as in JuliaPy/PyCall.jl#65 and @nowozin's comment? |
@stevengj I did, but not hard enough. Preloading both of my system's libblas.so and liblapack.so does the trick. PyPlot loads and produces plots. Many thanks for the package and the help.
on openSUSE 13.2 |
Thanks for persisting. This library conflict is frustrating; I'm currently preparing a patch (OpenMathLib/OpenBLAS#656) for OpenBLAS that will fix it (once it is accepted and Julia is updated to use the new version ... but that may take a while). |
I'm getting the same error on a system where I have a system-installed python which I override with the one from anaconda.
|
Please try this with the latest Julia 0.4 pre-release (rc4). I think this incorporates the patch that renamed the openblas library and should (I hope!!) remove the need for the |
@stevengj julia-0.4.0-rc4 fixes this issue for me. No more preloads. Many thanks! |
Fantastic! Thanks to @tkelman for his help with getting this merged. |
I still seem to be getting
on I rebuilt the julia binary with a clean openblas and did a rebuild of PyCall and PyPlot, but to no avail. |
@jpata, you might want to make sure that there is no |
Thanks, that was it. After
importing PyPlot seems to work. Great to have this fixed! |
I am still getting this error using a fresh install of 0.4.2:
I have tried removing the libopenblas.so, and LD_PRELOAD method, and making sure PyCall is updated. I am also using the Conda installation of PyPlot. I don't think I missed anything in the thread... Any further ideas? |
|
As of a few days ago, I lost the ability to
import PyPlot
. My error message is different from others that I saw in issues, and I didn't find a good resolution.The error is below. I'm running Ubuntu 15.04 and have only a single python install on my system. My python libraries were installed with
pip
and work fine in python. Also, in julia I can successfully@pyimport scimath
.Any ideas?
The text was updated successfully, but these errors were encountered: