Skip to content
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

@pyimport on julia 1.0: ERROR: syntax: unsupported const declaration on local variable #541

Closed
jbrea opened this issue Aug 27, 2018 · 1 comment

Comments

@jbrea
Copy link

jbrea commented Aug 27, 2018

On julia 1.0, with PyCall#master I get

julia> using PyCall

julia> try
           @pyimport pip
       catch
           println("failed")
       end
ERROR: syntax: unsupported `const` declaration on local variable around /home/j/.julia/packages/PyCall/lhrke/src/PyCall.jl:526

julia> @pyimport pip

julia> 
@stevengj
Copy link
Member

Put a global pip statement in the try block. See also JuliaLang/julia#28789

@pyimport is going away in the near future anyway — see also #517. You will just do pip = pyimport("pip"), and the scoping will be explicit.

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

No branches or pull requests

2 participants