Cannot build documentation when pyjulia is compiled for different virtual environment(?)
Error text:
* AttributeError: module 'eta_utility' has no attribute 'eta_x'
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 68 source files that are out of date
updating environment: [new config] 68 added, 0 changed, 0 removed
reading sources... [100%] util/util
WARNING: autodoc: failed to import module 'eta_x' from module 'eta_utility'; the following exception was raised:
Traceback (most recent call last):
File "C:\Users\usr\Documents\GitRepositories\eta-utility-functions\venv\lib\site-packages\sphinx\ext\autodoc\importer.py", line 58, in import_module
return importlib.import_module(modname)
File "C:\Program Files\Python38\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 848, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "C:\Users\usr\eta_utility\eta_x\__init__.py", line 2, in <module>
from .eta_x import ETAx
File "C:\Users\usr\eta_utility\eta_x\eta_x.py", line 16, in <module>
from eta_utility.eta_x.common import (
File "C:\Users\usr\eta_utility\eta_x\common\__init__.py", line 1, in <module>
from .callbacks import CallbackEnvironment, merge_callbacks
File "C:\Users\usr\eta_utility\eta_x\common\callbacks.py", line 8, in <module>
from eta_utility.eta_x.envs import BaseEnv
File "C:\Users\usr\eta_utility\eta_x\envs\__init__.py", line 12, in <module>
from .julia_env import JuliaEnv
File "C:\Users\usr\eta_utility\eta_x\envs\julia_env.py", line 13, in <module>
from julia import Main as Jl # noqa: I900
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 655, in _load_unlocked
File "<frozen importlib._bootstrap>", line 618, in _load_backward_compatible
File "C:\Users\usr\venv\lib\site-packages\julia\core.py", line 247, in load_module
JuliaMainModule(self, fullname))
File "C:\Users\usr\venv\lib\site-packages\julia\core.py", line 149, in __init__
self._julia = loader.julia
File "C:\Users\usr\venv\lib\site-packages\julia\core.py", line 239, in julia
self.__class__.julia = julia = Julia()
File "C:\Users\usr\venv\lib\site-packages\julia\core.py", line 483, 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:
C:\Users\usr\other\venv\scripts\python.exe
C:\Program Files\Python39\python39.dll
Python interpreter used to import PyJulia and its libpython.
C:\Users\usr\venv\Scripts\python.exe
C:\Program Files\Python38\python38.dll
In Julia >= 0.7, above two paths to `libpython` have to match exactly
in order for PyJulia to work out-of-the-box. To configure PyCall.jl to use
Python interpreter "C:\Users\usr\venv\Scripts\python.exe",
run the following code in the Python REPL:
>>> import julia
>>> julia.install()
For more information, see:
https://pyjulia.readthedocs.io/en/latest/troubleshooting.html
Building the documentation should not require julia at all. Please check, why pyjulia is being imported during documentation build and fix this import.