question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using PyCall from pyjulia fails

See original GitHub issue

I am using Julia Version 0.6.2 and Python 2.7.12 on linux. In Julia, I can execute “using PyCall” without problems. In Python, importing the julia module works fine, however, when creating the julia object, I get the following error: ArgumentError("Module PyCall not found in current path.\nRun Pkg.add("PyCall")to install the PyCall package.")Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/lukas/.local/lib/python2.7/site-packages/julia/core.py", line 370, in __init__ self._call(u"using PyCall") File "/home/lukas/.local/lib/python2.7/site-packages/julia/core.py", line 412, in _call self.check_exception(src) File "/home/lukas/.local/lib/python2.7/site-packages/julia/core.py", line 432, in check_exception .format(exception_type, src)) julia.core.JuliaError: Exception 'ArgumentError' occurred while calling julia code: using PyCall I checked that both use the same Julia bin.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
tkfcommented, Nov 8, 2018

It’s probably not an issue in PyJulia 0.2. Please reopen if not.

1reaction
jzazocommented, May 7, 2018

I will describe what I’ve done to set up pyjulia, please let me know if I have missed something. I know something similar works on Mac, so I don’t know why it doesn’t work on Ubuntu.

  1. Installed Anaconda with python 3.6.5.
  2. Installed JuliaPro 0.6.2.
  3. Added JuliaPro installation folder to path in .bashrc. “julia” is callable from terminal.
  4. Added $JUPITER and $PYTHON environment variables to path in in .bashrc.
  5. Added PyCall package to julia installation. It seems it is using correct libraries.
  6. Cloned pyjulia project. Installed with “pip3 install -e .” within project.
  7. Start a python session, type “import julia”, which looks OK. After that, “julia.Julia()” outputs "ArgumentError(“Module PyCall not found in current path.\nRunPkg.add(“PyCall”) …” error from first message.

If I write julia.Julia(debug=True), I get the following exception, indicating that Julia path is correctly found:

julia.Julia(debug=True)
JULIA_HOME = /opt/JuliaPro-0.6.2.2/Julia/bin,  libjulia_path = /opt/JuliaPro-0.6.2.2/Julia/bin/../lib/libjulia.so.0.6
calling jl_init_with_image(b'/home/javier/pyjulia/julia/fake-julia', /opt/JuliaPro-0.6.2.2/Julia/lib/julia/sys.so)
seems to work...
exception occured? None
exception occured? None
exception occured? None
exception occured? None
exception occured? 140013754761632
Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting — PyJulia 0.6.0 documentation
When you use PyJulia with another Python extension, you may see an error like version `GLIBCXX_3.4.22' not found (Linux) or The procedure entry...
Read more >
Package works in regular Julia, but generates error when ...
julia folder. It only broke when using PyCall. I have a julia file that calls a function from that package, and then I...
Read more >
can't call julia code from Python with PyCall, whose code calls ...
0 on Windows 10 error from 'using PyPlot': "The Python package matplotlib could not be found by pyimport. " 2 · Unable to...
Read more >
PyCall - JuliaHub
However, the default ordering of NumPy arrays created in Python is row-major, and some Python packages will throw an error if you try...
Read more >
Incorporating Julia Into Python Programs | Peter Baumgartner
Setting up a productive development environment, using the packages (PyJulia & PyCall) that allow for communicating between python and Julia ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found