Skip to content

Changes for Julia 0.4 - #47

Closed
benmoran wants to merge 38 commits into
JuliaPy:masterfrom
benmoran:clean-julia-0.4
Closed

benmoran wants to merge 38 commits into
JuliaPy:masterfrom
benmoran:clean-julia-0.4

Conversation

@benmoran

Copy link
Copy Markdown

To fix #38 (also needs JuliaPy/PyCall.jl#219)

@sebastroy

Copy link
Copy Markdown

Have you tested unitttest with the PyCall #219 and do the test pass? Just curious. I will try your latest changes when I have a minute. In the meantime I found another python library to do what I needed to do with pyjulia but I still would like the option to go back to julia if someonw manage to fix the upgrade to 0.4 + python 3.4+ Thanks!

@benmoran

Copy link
Copy Markdown
Author

@sebastroy good catch, I hadn't updated the tests. They do pass for me now, on both Python 3.4 and 2.7 (on Ubuntu 14.04).

@benmoran

Copy link
Copy Markdown
Author

The Travis build is failing because it's unable to find sys.so. I don't know how to investigate that, can anyone help?

Also is there any way to test PyJulia on Windows?

@mlubin

mlubin commented Dec 14, 2015

Copy link
Copy Markdown

Travis shouldn't be using the julia binaries from the ppa anymore. Not sure if switching to language: julia is correct or if you should just manually unpack the binaries. CC @tkelman

@tkelman

tkelman commented Dec 15, 2015

Copy link
Copy Markdown

It's probably easier to manually extract the different Julia binaries than it is to switch python versions.

For Windows testing, you can try AppVeyor.

Comment thread julia/core.py Outdated

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why call julia_init? Is that part of the public API? Shouldn't it be jl_init?

@PallHaraldsson

Copy link
Copy Markdown
Contributor

Is this one outdated? I'm assuming 0.4 support is in (other issue[s] seem to indicate that). Just close or is this for even better support? @benmoran such as for pyjulia on Windows? In case this is not outdated and is useful for Windows (or otherwise) the errors "no environment variables set" seem trivial for someone who know this and/or travis. Any pointers in case I can help?

@sebastroy

Copy link
Copy Markdown

I don't think this is outdated. I personnage haven't had time to test these
fixes yet. It is not integrated yet in master for what it's worth.

On Tue, Jan 5, 2016 at 7:28 AM, Páll Haraldsson [email protected]
wrote:

Is this one outdated? I'm assuming 0.4 support is in (other issue[s] seem
to indicate that). Just close or is this for even better support?
@benmoran https://github.com/benmoran such as for pyjulia on Windows?

—
Reply to this email directly or view it on GitHub
#47 (comment).

@benmoran

Copy link
Copy Markdown
Author

This is working for me on 0.4, I don't have access to a Windows setup to test it and I don't know how to use AppVeyor. Would love to see it merged.

@mmagnuski

Copy link
Copy Markdown

The error from Travis is: ERROR: system image file "/home/travis/virtualenv/python3.4.2/bin/../lib/x86_64-linux-gnu/julia/sys.so" not found
so it seems that python is looking in the wrong place for julia/sys.so.

An example AppVeyor setup is in Example.jl

@mmagnuski

Copy link
Copy Markdown

I can help setting up AppVeyor, I would really like pyjulia to work on julia 0.4.
When it comes to merging: @jakebolewski is the owner of this repo so he could merge. But before that it would be good to make travis green. I don't know enough about pyjulia to suggest how to fix the tests unfortunatelly. :(

@mmagnuski

Copy link
Copy Markdown

Congrats @benmoran ! 👍 💚

@benmoran

Copy link
Copy Markdown
Author

It wasn't working inside virtualenvs before, nor on Python 3 - both fixed. I have added an appveyor.yml for Windows tests. The Appveyor build from my fork https://ci.appveyor.com/project/benmoran/pyjulia seems to be taking a very long time - would still appreciate if you could have a look @mmagnuski. Thanks for your help!

@mmagnuski

Copy link
Copy Markdown

I'll take a look, but my general impression is that AppVeyor is much slower than Travis. Great to see pyjulia finally working. :)

@mmagnuski

Copy link
Copy Markdown

For some reason your AppVeyor 32-bit builds exceed maximum time, I'm not sure why.
I don't think this PR has to fix pyjulia on Windows, this can be done in a separate one, once this one gets merged.

Anywany - concerning Windows support, on my Windows 8 I get an error:

>>> import julia
>>> j = julia.Julia()
ERROR: system image file "C:\Users\current_user\lib\julia\sys.dll" not found

Where current_user is the user name. There is no lib folder in the C:\Users\current_user on Windows.
In Julia:

julia> JULIA_HOME
"C:\\Users\\current_user\\AppData\\Local\\Julia-0.4.3\\bin"

The path to julia\sys.dll on Windows is:

C:\Users\current_user\AppData\Local\Julia-0.4.3\lib\julia

I am not sure how pyjulia comes up with C:\Users\current_user\lib\julia (...) because the following code works well (I keep the output intact, so instead of current_user the actual user name is present):

import subprocess
runtime = 'julia'
juliainfo = subprocess.check_output([runtime, "-e", """
    println(JULIA_HOME)
    println(Libdl.dlpath(Libdl.dlopen(\"libjulia\")))
    """])
>>> juliainfo
b'C:\\Users\\Miku\xc5\x9b\\AppData\\Local\\Julia-0.4.3\\bin\nC:\\Users\\Miku\xc5\x9b\\AppData\\Local\\Julia-0.4.3\\bin\\libjulia.dll\n'

>>> libjulia_path = juliainfo.decode("utf-8").rstrip().split("\n")
>>> libjulia_path
['C:\\Users\\Mikuś\\AppData\\Local\\Julia-0.4.3\\bin', 'C:\\Users\\Mikuś\\AppData\\Local\\Julia-0.4.3\\bin\\libjulia.dll']

@mmagnuski

Copy link
Copy Markdown

Depending on what I pass to jl_runtime_path I can reproduce the AppVeyor error (libjulia_path is the same as in my previous post):

>>> j = julia.Julia(jl_runtime_path=libjulia_path[0])                            
Traceback (most recent call last):                                               
  File "<stdin>", line 1, in <module>                                            
  File "C:\Users\Mikuś\Anaconda3\lib\site-packages\julia\core.py", line 240, in _
_init__                                                                          
    """])                                                                        
  File "C:\Users\Mikuś\Anaconda3\lib\subprocess.py", line 629, in check_output   
    **kwargs).stdout                                                             
  File "C:\Users\Mikuś\Anaconda3\lib\subprocess.py", line 696, in run            
    with Popen(*popenargs, **kwargs) as process:                                 
  File "C:\Users\Mikuś\Anaconda3\lib\subprocess.py", line 950, in __init__       
    restore_signals, start_new_session)                                          
  File "C:\Users\Mikuś\Anaconda3\lib\subprocess.py", line 1220, in _execute_child

    startupinfo)                                                                 
PermissionError: [WinError 5] Odmowa dostępu                                     

>>> j = julia.Julia(jl_runtime_path=libjulia_path[1])                            
Traceback (most recent call last):                                               
  File "<stdin>", line 1, in <module>                                            
  File "C:\Users\Mikuś\Anaconda3\lib\site-packages\julia\core.py", line 240, in _
_init__                                                                          
    """])                                                                        
  File "C:\Users\Mikuś\Anaconda3\lib\subprocess.py", line 629, in check_output   
    **kwargs).stdout                                                             
  File "C:\Users\Mikuś\Anaconda3\lib\subprocess.py", line 696, in run            
    with Popen(*popenargs, **kwargs) as process:                                 
  File "C:\Users\Mikuś\Anaconda3\lib\subprocess.py", line 950, in __init__       
    restore_signals, start_new_session)                                          
  File "C:\Users\Mikuś\Anaconda3\lib\subprocess.py", line 1220, in _execute_child

    startupinfo)                                                                 
OSError: [WinError 193] %1 nie jest prawidłową aplikacją systemu Win32

The last error message means %1 is not a valid Win32 application

@mmagnuski mmagnuski mentioned this pull request Feb 1, 2016
@benmoran

Copy link
Copy Markdown
Author

@stevengj has reverted the changes to PyCall.jl that allow this patch to work - you need to checkout PyCall.jl v1.3.0 for this to work now: JuliaPy/PyCall.jl#219

@Keno

Keno commented Jul 18, 2016

Copy link
Copy Markdown
Contributor

Partly included in #54.

@Keno Keno closed this Jul 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

v0.4 support

8 participants