Skip to content

Using PyCall from pyjulia fails #148

Closed

Description

@edmundus

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.

Activity

  1. jzazo commented on May 3, 2018

    @jzazo

    I have same problem on Ubuntu with Anaconda and Python 3.6. Can anyone help?

  2. jzazo commented on May 7, 2018

    @jzazo

    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
    
  3. rohanaras commented on Jul 2, 2018

    @rohanaras

    I'm having a similar issue as well when I try to %load_ext julia.magic in a jupyter notebook.

  4. mprogram commented on Aug 17, 2018

    @mprogram

    Adding my vote here too. Will the issue be fixed? I'm having it with Julia 0.7 and wookay/pull/1 adopted patch.

  5. tkf commented on Nov 8, 2018

    @tkf
    Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions