who would give me a hand for using py4cl?
cl-03 opened this issue · comments
Execution of a form compiled with errors.
Form:
(PY4CL:IMPORT-MODULE "math" :RELOAD T)
Compile-time error:
(during macroexpansion of (PY4CL:IMPORT-MODULE "math" ...))
end of file on #<SB-SYS:FD-STREAM for "descriptor 10" {1003EAD7C3}>
[Condition of type SB-INT:COMPILED-PROGRAM-ERROR]
Restarts:
0: [TRY-RECOMPILING] Recompile tests and try loading it again
1: [RETRY] Retry loading FASL for #<CL-SOURCE-FILE "py4cl/tests" "tests">.
2: [ACCEPT] Continue, treating loading FASL for #<CL-SOURCE-FILE "py4cl/tests" "tests"> as having been successful.
3: [RETRY] Retry ASDF operation.
4: [CLEAR-CONFIGURATION-AND-RETRY] Retry ASDF operation after resetting the configuration.
5: [RETRY] Retry ASDF operation.
--more--
Backtrace:
0: (SB-FASL::LOAD-FASL-GROUP #S(SB-FASL::FASL-INPUT :STREAM #<SB-SYS:FD-STREAM for "file /home/clsper/.cache/common-lisp/sbcl-2.0.6.debian-linux-x64/home/clsper/quicklisp/dists/quicklisp/software/py4cl-2..
1: (SB-FASL::LOAD-AS-FASL #<SB-SYS:FD-STREAM for "file /home/clsper/.cache/common-lisp/sbcl-2.0.6.debian-linux-x64/home/clsper/quicklisp/dists/quicklisp/software/py4cl-20200925-git/tests/tests.fasl" {100..
2: ((FLET SB-FASL::THUNK :IN LOAD))
3: (SB-FASL::CALL-WITH-LOAD-BINDINGS #<CLOSURE (FLET SB-FASL::THUNK :IN LOAD) {7F033A63C7CB}> #<SB-SYS:FD-STREAM for "file /home/clsper/.cache/common-lisp/sbcl-2.0.6.debian-linux-x64/home/clsper/quicklis..
4: ((FLET SB-FASL::LOAD-STREAM :IN LOAD) #<SB-SYS:FD-STREAM for "file /home/clsper/.cache/common-lisp/sbcl-2.0.6.debian-linux-x64/home/clsper/quicklisp/dists/quicklisp/software/py4cl-20200925-git/tests/t..
5: (LOAD #P"/home/clsper/.cache/common-lisp/sbcl-2.0.6.debian-linux-x64/home/clsper/quicklisp/dists/quicklisp/software/py4cl-20200925-git/tests/tests.fasl" :VERBOSE NIL :PRINT NIL :IF-DOES-NOT-EXIST T :E..
6: (UIOP/UTILITY:CALL-WITH-MUFFLED-CONDITIONS #<CLOSURE (LAMBDA NIL :IN UIOP/LISP-BUILD:LOAD*) {100BD1780B}> ("Overwriting already existing readtable ~S." #(#:FINALIZERS-OFF-WARNING :ASDF-FINALIZERS)))
Does (py4cl:python-version-info)
work? Does py4cl:*python-command*
point to the correct python binary?
Edit: I suspect it's the same issue as #25
Does
(py4cl:python-version-info)
work? Doespy4cl:*python-command*
point to the correct python binary?
IT DOESN'T WORK,AND I ALSO HAVE A TRY TO(setf py4cl:*python-command* “python3” )
,BUT IT STILL DOESN'T WORK.
TYPE(py4cl:python-version-info)
IN REPL, AND IT SIGNAL AS BELLOW.
end of file on #<SB-SYS:FD-STREAM for "descriptor 6" {100D6F4283}>
[Condition of type END-OF-FILE]
Restarts:
0: [RETRY] Retry SLIME REPL evaluation request.
1: [*ABORT] Return to SLIME's top level.
2: [ABORT] abort thread (#<THREAD "repl-thread" RUNNING {100CA487A3}>)
Backtrace:
Try with the full path to the python binary (setf py4cl:*python-command* "/full/path/to/your/python/binary")
Try with the full path to the python binary
(setf py4cl:*python-command* "/full/path/to/your/python/binary")
All the path I tried and also signal error, the paths as bellow:
clsper@clsper-virtual-machine:$ whereis python$
python: /usr/bin/python3.8 /usr/bin/python3.8-config /usr/lib/python3.8 /usr/lib/python2.7 /usr/lib/python3.9 /etc/python3.8 /usr/local/lib/python3.8 /usr/include/python3.8
clsper@clsper-virtual-machine:
Hmm, nope, unable to reproduce locally, works fine with the python3.8 from miniconda on my machine. Could you also report what the output of /usr/bin/python3.8 py4cl.py
?
Maybe I GOT the reason I guess.
When I tried to open emacs on sudo or root,reset .emacs file and made QUICKLISP work, I typed:
(ql:qucikload :py4cl)
then typed:
(ql:quickload :py4cl/tests)
it jumped the first error talked above .
But signal another error that I just had seen before on the issue,
; caught ERROR:
; (during macroexpansion of (PY4CL:IMPORT-MODULE "math" ...))
; Python error: "name 'delete_numpy_pickle_arrays' is not defined"
[package py4cl/tests].....................
Hmm, nope, unable to reproduce locally, works fine with the python3.8 from miniconda on my machine. Could you also report what the output of
/usr/bin/python3.8 py4cl.py
?
IT seems always in processing,IT still give none back even waiting for 3 mins,
clsper@clsper-virtual-machine:~/quicklisp/dists/quicklisp/software/py4cl-20200925-git$ /usr/bin/python3.8 py4cl.py
root-authority maybe a problem When comes with some situation
Python error: "name 'delete_numpy_pickle_arrays' is not defined"
This was fixed recently; it will take a while for it to be in quicklisp; so, currently clone the project in quicklisp/local-projects
or somewhere to use it.
It was assuming the existence of numpy; but the recent commits avoid that assumption and should let you run it without numpy.
Thank you very much,IT all works well.
When I have made 'numpy' installed,there are no errors signal any more.
give best and deep gratitude to you,thanks