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

PyJulia build fails; can't find package 'Pkg' in current path #382

Open
Will-Gorman opened this issue May 14, 2020 · 1 comment
Open

PyJulia build fails; can't find package 'Pkg' in current path #382

Will-Gorman opened this issue May 14, 2020 · 1 comment

Comments

@Will-Gorman
Copy link

I am trying to build PyJulia on my system but get the following error when trying to install via Python:

>>> import julia
>>> julia.install()
ERROR: LoadError: ArgumentError: Package Pkg not found in current path:
- Run `import Pkg; Pkg.add("Pkg")` to install the Pkg package.

Stacktrace:
 [1] require(::Module, ::Symbol) at .\loading.jl:823
 [2] include at .\boot.jl:326 [inlined]
 [3] include_relative(::Module, ::String) at .\loading.jl:1038
 [4] include(::Module, ::String) at .\sysimg.jl:29
 [5] exec_options(::Base.JLOptions) at .\client.jl:267
 [6] _start() at .\client.jl:436
in expression starting at C:\Users\wgorman\AppData\Local\Continuum\anaconda3\lib\site-packages\julia\install.jl:12
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\wgorman\AppData\Local\Continuum\anaconda3\lib\site-packages\julia\tools.py", line 102, in install
    raise PyCallInstallError("Installing", output)
julia.tools.PyCallInstallError: Installing PyCall failed.

When I install via Julia, I make sure to point the build installation to the correct Python interpreter and libpython, however, when I try to make a simple call within Python it says that those variables haven't been defined.

>>> import julia
>>> from julia import Main
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
  File "C:\Users\wgorman\AppData\Local\Continuum\anaconda3\lib\site-packages\julia\core.py", line 246, in load_module
    JuliaMainModule(self, fullname))
  File "C:\Users\wgorman\AppData\Local\Continuum\anaconda3\lib\site-packages\julia\core.py", line 148, in __init__
    self._julia = loader.julia
  File "C:\Users\wgorman\AppData\Local\Continuum\anaconda3\lib\site-packages\julia\core.py", line 238, in julia
    self.__class__.julia = julia = Julia()
  File "C:\Users\wgorman\AppData\Local\Continuum\anaconda3\lib\site-packages\julia\core.py", line 482, in __init__
    raise UnsupportedPythonError(jlinfo)
julia.core.UnsupportedPythonError: It seems your Julia and PyJulia setup are not supported.

Julia executable:
    julia
Python interpreter and libpython used by PyCall.jl:
    None
    None
Python interpreter used to import PyJulia and its libpython.
    C:\Users\wgorman\AppData\Local\Continuum\anaconda3\python.exe
    C:\Users\wgorman\AppData\Local\Continuum\anaconda3\python37.dll
julia> versioninfo()
Julia Version 1.0.5
Commit 3af96bcefc (2019-09-09 19:06 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.0 (ORCJIT, sandybridge)
Python 3.7.3 (default, Mar 27 2019, 17:13:21) [MSC v.1915 64 bit (AMD64)]
Windows-10-10.0.18362-SP0
8 logical CPU cores, Intel64 Family 6 Model 42 Stepping 7, GenuineIntel
@Will-Gorman
Copy link
Author

Solution answered on stackoverflow feels like a workaround rather than a solution that connects julia and python.

https://stackoverflow.com/questions/61787575/pyjulia-build-fails-cant-find-package-pkg-in-current-path-during-import

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

1 participant