vsl.plot crash on nvidia jetson nano
holder66 opened this issue · comments
VSL version:
Module {
name: 'vsl'
description: 'The V Scientific Library'
version: '0.1.45'
license: 'MIT'
repo_url: 'https://github.com/vlang/vsl'
dependencies: []
}
OS:
$ v doctor18.04) 7.5.0
OS: linux, Ubuntu 18.04.6 LTS
Processor: 4 cpus, 64bit, little endian, ARMv8 Processor rev 1 (v8l)
CC version: cc (Ubuntu/Linaro 7.5.0-3ubuntu1
getwd: /home/henkjet
vmodules: /home/henkjet/.vmodules
vroot: /home/henkjet/v
vexe: /home/henkjet/v/v
vexe mtime: 2022-02-15 03:23:38
is vroot writable: true
is vmodules writable: true
V full version: V 0.2.4 89e9f8a.e23db2f
Git version: git version 2.17.1
Git vroot status: weekly.2022.07-4-ge23db2f9
.git/config present: true
thirdparty/tcc status: thirdparty-linux-arm64 ddcd4425
What did you do?
Running a _test.v file which includes generating a plot; works fine on my macbook pro!
What did you expect to see?
What did you see instead?
V panic: /home/henkjet/.vmodules/vsl/plot/run.sh: line 21: /home/henkjet/.vmodules/vsl/plot/.plotvenv_v1/bin/activate: No such file or directory
File "/home/henkjet/.vmodules/vsl/plot/plotter.py", line 62
if f'{ax}axis' in layout:
^
SyntaxError: invalid syntax
/home/henkjet/.vmodules/vsl/plot/run.sh: line 23: deactivate: command not found
v hash: e23db2f
/tmp/v_1000/vhamnn.18206535192042572013.tmp.c:12925: at _v_panic: Backtrace
/tmp/v_1000/vhamnn.18206535192042572013.tmp.c:30897: by holder66__hamnn__plot_explore
/tmp/v_1000/vhamnn.18206535192042572013.tmp.c:30167: by holder66__hamnn__explore
/tmp/v_1000/vhamnn.18206535192042572013.tmp.c:32648: by main__do_explore
/tmp/v_1000/vhamnn.18206535192042572013.tmp.c:32422: by main__main
/tmp/v_1000/vhamnn.18206535192042572013.tmp.c:33239: by main
v hash: 89e9f8a
/tmp/v_1000/vhamnn_test.13279095690726210677.tmp.c:13151: at _v_panic: Backtrace
/tmp/v_1000/vhamnn_test.13279095690726210677.tmp.c:20984: by os__execute_or_panic
/tmp/v_1000/vhamnn_test.13279095690726210677.tmp.c:33107: by main__test_explore
/tmp/v_1000/vhamnn_test.13279095690726210677.tmp.c:34191: by main
I'm still getting the same panic:
V panic: /home/henkjet/.vmodules/vsl/plot/run.sh: line 21: /home/henkjet/.vmodules/vsl/plot/.plotvenv_v1/bin/activate: No such file or directory
File "/home/henkjet/.vmodules/vsl/plot/plotter.py", line 62
if f'{ax}axis' in layout:
^
SyntaxError: invalid syntax
/home/henkjet/.vmodules/vsl/plot/run.sh: line 23: deactivate: command not found
v hash: 4cdb244
/tmp/v_1000/vhamnn.8487976101640470841.tmp.c:12990: at _v_panic: Backtrace
/tmp/v_1000/vhamnn.8487976101640470841.tmp.c:30966: by holder66__hamnn__plot_explore
/tmp/v_1000/vhamnn.8487976101640470841.tmp.c:30236: by holder66__hamnn__explore
/tmp/v_1000/vhamnn.8487976101640470841.tmp.c:32717: by main__do_explore
/tmp/v_1000/vhamnn.8487976101640470841.tmp.c:32491: by main__main
/tmp/v_1000/vhamnn.8487976101640470841.tmp.c:33309: by main
v hash: 4cdb244
/tmp/v_1000/vhamnn_test.10565393188602021605.tmp.c:12962: at _v_panic: Backtrace
/tmp/v_1000/vhamnn_test.10565393188602021605.tmp.c:20643: by os__execute_or_panic
/tmp/v_1000/vhamnn_test.10565393188602021605.tmp.c:32739: by main__test_explore
/tmp/v_1000/vhamnn_test.10565393188602021605.tmp.c:33821: by main
@holder66 can you send more context on that? python version, shell you are using
echo $0 => bash
python returns 2.7.17, GCC 7.5.0
python3 returns 3.6.9, GCC 8.4.0
I had changed the references to python3 in create-venv.sh (see attached file; I added .txt to the filename so github would accept it)
create-venv.sh.txt
Nice! I'll push a fix tonight and ask you to try again 👌🏻
@holder66 I just pushed the fix to master. Can you pull and try again?
The pull aborted because I had modified the create-venv.sh file, so instead I did v remove vsl
and then v install vsl
which ran.
Now I get:
henkjet@henryjetson:~/vlang/vhamnn$ v run . rank -g datasets/iris.tab
Attributes Sorted by Rank Value, for "datasets/iris.tab"
Missing values: included
Bin range for continuous attributes: from 2 to 16 with interval 1
Index Name Type Rank Value Bins
3 petal width C 96.00 3
2 petal length C 95.33 11
0 sepal length C 71.33 13
1 sepal width C 47.33 12
Traceback (most recent call last):
File "/home/henkjet/.vmodules/vsl/plot/plotter.py", line 4, in <module>
import plotly.graph_objects as go
ModuleNotFoundError: No module named 'plotly'
processing time: 0 hrs 0 min 0.514 sec
can you remove ~/.vmodules/vsl/plot/.plotvenv_v1
and try again? If that works I have a fix
henkjet@henryjetson:~/vlang/vhamnn$ v run . rank -g datasets/iris.tab
Creating plotly virtualenv...
Collecting plotly
Downloading https://files.pythonhosted.org/packages/9f/16/c63412aec59219142b541011524417ef1c1c226e4a5ed2eb1cd808cd1a2b/plotly-5.6.0-py2.py3-none-any.whl (27.7MB)
Collecting numpy
Downloading https://files.pythonhosted.org/packages/51/60/3f0fe5b7675a461d96b9d6729beecd3532565743278a9c3fe6dd09697fa7/numpy-1.19.5.zip (7.3MB)
Collecting tenacity>=6.2.0 (from plotly)
Downloading https://files.pythonhosted.org/packages/f2/a5/f86bc8d67c979020438c8559cc70cfe3a1643fd160d35e09c9cca6a09189/tenacity-8.0.1-py3-none-any.whl
Collecting six (from plotly)
Downloading https://files.pythonhosted.org/packages/d9/5a/e7c31adbe875f2abbb91bd84cf2dc52d792b5a01506781dbcf25c91daf11/six-1.16.0-py2.py3-none-any.whl
Building wheels for collected packages: numpy
Running setup.py bdist_wheel for numpy: started
Running setup.py bdist_wheel for numpy: finished with status 'error'
Complete output from command /home/henkjet/.vmodules/vsl/plot/.plotvenv_v1/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-g7z_lhpt/numpy/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmp23c_c_k3pip-wheel- --python-tag cp36:
Running from numpy source directory.
Cythonizing sources
Processing numpy/random/_bounded_integers.pxd.in
Processing numpy/random/_bounded_integers.pyx.in
Traceback (most recent call last):
File "/tmp/pip-build-g7z_lhpt/numpy/tools/cythonize.py", line 59, in process_pyx
from Cython.Compiler.Version import version as cython_version
ModuleNotFoundError: No module named 'Cython'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/tmp/pip-build-g7z_lhpt/numpy/tools/cythonize.py", line 235, in <module>
main()
File "/tmp/pip-build-g7z_lhpt/numpy/tools/cythonize.py", line 231, in main
find_process_files(root_dir)
File "/tmp/pip-build-g7z_lhpt/numpy/tools/cythonize.py", line 222, in find_process_files
process(root_dir, fromfile, tofile, function, hash_db)
File "/tmp/pip-build-g7z_lhpt/numpy/tools/cythonize.py", line 188, in process
processor_function(fromfile, tofile)
File "/tmp/pip-build-g7z_lhpt/numpy/tools/cythonize.py", line 91, in process_tempita_pyx
process_pyx(pyxfile, tofile)
File "/tmp/pip-build-g7z_lhpt/numpy/tools/cythonize.py", line 64, in process_pyx
raise OSError('Cython needs to be installed in Python as a module')
OSError: Cython needs to be installed in Python as a module
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-g7z_lhpt/numpy/setup.py", line 508, in <module>
setup_package()
File "/tmp/pip-build-g7z_lhpt/numpy/setup.py", line 488, in setup_package
generate_cython()
File "/tmp/pip-build-g7z_lhpt/numpy/setup.py", line 285, in generate_cython
raise RuntimeError("Running cythonize failed!")
RuntimeError: Running cythonize failed!
----------------------------------------
Failed building wheel for numpy
Running setup.py clean for numpy
Complete output from command /home/henkjet/.vmodules/vsl/plot/.plotvenv_v1/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-g7z_lhpt/numpy/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" clean --all:
Running from numpy source directory.
`setup.py clean` is not supported, use one of the following instead:
- `git clean -xdf` (cleans all files)
- `git clean -Xdf` (cleans all versioned files, doesn't touch
files that aren't checked into the git repo)
Add `--force` to your command to use it anyway if you must (unsupported).
----------------------------------------
Failed cleaning build dir for numpy
Failed to build numpy
Installing collected packages: tenacity, six, plotly, numpy
Running setup.py install for numpy: started
Running setup.py install for numpy: finished with status 'error'
Complete output from command /home/henkjet/.vmodules/vsl/plot/.plotvenv_v1/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-g7z_lhpt/numpy/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-10v_rgzf-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/henkjet/.vmodules/vsl/plot/.plotvenv_v1/include/site/python3.6/numpy:
Running from numpy source directory.
Note: if you need reliable uninstall behavior, then install
with pip instead of using `setup.py install`:
- `pip install .` (from a git repo or downloaded source
release)
- `pip install numpy` (last NumPy release on PyPi)
Cythonizing sources
numpy/random/_bounded_integers.pxd.in has not changed
Processing numpy/random/_bounded_integers.pyx.in
Traceback (most recent call last):
File "/tmp/pip-build-g7z_lhpt/numpy/tools/cythonize.py", line 59, in process_pyx
from Cython.Compiler.Version import version as cython_version
ModuleNotFoundError: No module named 'Cython'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/tmp/pip-build-g7z_lhpt/numpy/tools/cythonize.py", line 235, in <module>
main()
File "/tmp/pip-build-g7z_lhpt/numpy/tools/cythonize.py", line 231, in main
find_process_files(root_dir)
File "/tmp/pip-build-g7z_lhpt/numpy/tools/cythonize.py", line 222, in find_process_files
process(root_dir, fromfile, tofile, function, hash_db)
File "/tmp/pip-build-g7z_lhpt/numpy/tools/cythonize.py", line 188, in process
processor_function(fromfile, tofile)
File "/tmp/pip-build-g7z_lhpt/numpy/tools/cythonize.py", line 91, in process_tempita_pyx
process_pyx(pyxfile, tofile)
File "/tmp/pip-build-g7z_lhpt/numpy/tools/cythonize.py", line 64, in process_pyx
raise OSError('Cython needs to be installed in Python as a module')
OSError: Cython needs to be installed in Python as a module
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-g7z_lhpt/numpy/setup.py", line 508, in <module>
setup_package()
File "/tmp/pip-build-g7z_lhpt/numpy/setup.py", line 488, in setup_package
generate_cython()
File "/tmp/pip-build-g7z_lhpt/numpy/setup.py", line 285, in generate_cython
raise RuntimeError("Running cythonize failed!")
RuntimeError: Running cythonize failed!
----------------------------------------
Command "/home/henkjet/.vmodules/vsl/plot/.plotvenv_v1/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-g7z_lhpt/numpy/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-10v_rgzf-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/henkjet/.vmodules/vsl/plot/.plotvenv_v1/include/site/python3.6/numpy" failed with error code 1 in /tmp/pip-build-g7z_lhpt/numpy/
Attributes Sorted by Rank Value, for "datasets/iris.tab"
Missing values: included
Bin range for continuous attributes: from 2 to 16 with interval 1
Index Name Type Rank Value Bins
3 petal width C 96.00 3
2 petal length C 95.33 11
0 sepal length C 71.33 13
1 sepal width C 47.33 12
Traceback (most recent call last):
File "/home/henkjet/.vmodules/vsl/plot/plotter.py", line 5, in <module>
import numpy as np
ModuleNotFoundError: No module named 'numpy'
processing time: 0 hrs 0 min 2.392 sec
henkjet@henryjetson:~/vlang/vhamnn$
I'll have to go through in detail later; pressed for time right now. But thanks for your efforts!
@holder66 can you send me the output of the following commands?
pip --version
pip3 --version
I installed pip3, using apt-get. version gets:
pip 9.0.1 from /usr/lib/python3/dist-packages (python 3.6)
Gotcha, I'll send some instructions later so we can get more details on what is going on 👌🏻
can you modify your file ~/.vmodules/vsl/plot/create-venv.sh
adding Cython
to the list at line 24?
the new content of the file should be something like this:
#!/usr/bin/env bash
## Copyright (C) 2019-2021 The VSL Team
## Licensed under MIT
##
## @script.name [OPTION] ARGUMENTS...
##
## Options:
## -h, --help Prints usage and example
## --venv=PATH Virtual Env path
##
ROOT=$(dirname "$0")
source "${ROOT}/../bin/util/opts/opts.sh" || exit
source "${ROOT}/python.sh"
if [ -d "${venv}" ]; then
exit 0
fi
"${python_bin}" -m venv "${venv}"
source "${venv}/bin/activate"
pip install plotly numpy Cython
deactivate
after that you will need to remove the dir ~/.vmodules/vsl/plot/.plotvenv_v1
and try again 👌🏻