Open tsbertalan opened 2 years ago
I guess the bird left sometime last night. It looks like
from julia import Julia, install
install()
jl = Julia()
helps. (It looks like this should have been run by install_dojopy.bash
via setup_pyjulia.py
; not sure why that part didn't fire. I added set -e
to my install_dojopy.bash
to find out next time, and hardcoded all argument paths). Now the error from the test script is just
Traceback (most recent call last):
File "test_dojopy.py", line 3, in <module>
from julia import Dojo as dojo
File "/home/tsbertalan/Dropbox/Projects/Dojo/auto_generated_dojo_env/lib/python3.8/site-packages/julia/core.py", line 260, in load_module
raise ImportError("{} not found".format(juliapath))
ImportError: Dojo not found
So, I did the Dojo installation instructions in a Julia REPL
Dojo
can be added via the Julia package manager (type]
):pkg> add Dojo
I added this in setup_julia.py
:
def install(*, confirm=False):
######################
### EXISTING CODE HERE
######################
julia = _find_julia()
subprocess.check_output(
julia,
'-e',
'Pkg.add("Dojo")',
)
This results in several very impressive unicode progress bars being displayed in the terminal for a few minutes.
After this, my auto_generated_dojo_env
mysteriously didn't work (~/.pyenv/versions
was somehow empty), but, when I blew away auto_generated_dojo_env
and again re-ran bash install_dojopy.bash
and re-sourced auto_generated_dojo_env/bin/activate
, I at least got a reasonable error that nu
wasn't defined.
It seems I can fix this by commenting out the Base.rand
stuff and instead doing import numpy as np; u1 = np.random.uniform(size=(1,))
. However, if I run the resulting script (see e40e622 on my fork for all modified scripts) (whether in terminal or copy-pasting into ipython), it finishes (slowly) without errors, but I am unable to open the MeshCat server that it claims is running at http://127.0.0.1:8700.
I created a 3.8 virtualenv (at
~/.virtualenvs/PROJECT
) for for dojopy, and then ran dojopy.install() there. It asked for root, and proceeded to make another virtualenv under mine, at~/.virtualenvs/PROJECT/lib/python3.8/site-packages/auto_generated_dojo_env/bin/activate
.The
install()
process finished, but there was an error in the output above that ending withI though maybe I could fix this by activating that inner virtualenv directly after dectivating mine, and then installing Pillow>=8.0.0 directly. However, the
python3
in that bin folder is a symlink to the nonexistent/root/.pyenv/versions/3.8.2/bin/python3
, so that environment was broken if I tried to activate it in a fresh terminal (which python
points to/usr/bin/python
, and ipython fails with a Permission denied.I created the above PROJECT venv directly with
python3 -m venv ...
. Julia 1.7.2 is installed already in /usr/local/bin/julia, I believe with apt.Looking a little deeper, decided that it would make more sense to ru n
install_dojopy.bash
as my user, but then put somesudo
s on the apt commands used. So I moved the dojopy clone to a new~/Dropbox/Projects/Dojo
WORKING_DIR
, and did this diff (see fork):I then pip-uninstalled dojopy and reran
pip install -e ./dojopy
in my env. After this,bash dojopy/dojopy/install_dojopy.bash
seemed to work, but if Ideactivate
,source auto_generated_dojo_env/bin/activate
, and run the sample pendulum 1-step script, I getBut there is a bird in the office now, so I'll need to go home and continue this troubleshooting tomorrow.