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

Android/Termux pyswip error #64

Closed
woofwoof opened this issue Oct 2, 2019 · 2 comments
Closed

Android/Termux pyswip error #64

woofwoof opened this issue Oct 2, 2019 · 2 comments

Comments

@woofwoof
Copy link

woofwoof commented Oct 2, 2019

Hello!
I'm struggling to get pyswip working under Termux on Android. The following is a transcript of my current results. As you can see swipl seems to be called but results in command line options being reported to stdin & exiting python. Could you possibly please help? Maybe you have experience of this? Thank you.

Welcome to Termux!

Wiki: https://wiki.termux.
com
Community forum: https://termux.com/c
ommunity
Gitter chat: https://gitter.im/te
rmux/termux
IRC channel: #termux on freenode

Working with packages:

  • Search packages: pkg search
  • Install a package: pkg install
  • Upgrade packages: pkg upgrade

Subscribing to additional repositorie
s:

  • Root: pkg install root-repo
  • Unstable: pkg install unstable-rep
    o
  • X11: pkg install x11-repo

Report issues at https://termux.com/i
ssues

$ python
Python 3.7.4 (default, Jul 28 2019, 2
2:40:01)
[Clang 8.0.7 (https://android.googles
ource.com/toolchain/clang b55f2d4ebfd
35bf6 on linux
Type "help", "copyright", "credits" o
r "license" for more information.

from pyswip import Prolog
Traceback (most recent call last):
File "", line 1, in
File "/data/data/com.termux/files/u
sr/lib/python3.7/site-packages/pyswip
/init.py", line 29, in
from pyswip.prolog import Prolog
File "/data/data/com.termux/files/u
sr/lib/python3.7/site-packages/pyswip
/prolog.py", line 28, in
from pyswip.core import *
File "/data/data/com.termux/files/u
sr/lib/python3.7/site-packages/pyswip
/core.py", line 568, in
(_path, SWI_HOME_DIR) = _findSwip
l()
File "/data/data/com.termux/files/u
sr/lib/python3.7/site-packages/pyswip
/core.py", line 428, in _findSwipl
raise ImportError('Could not find
the SWI-Prolog library in this '
ImportError: Could not find the SWI-P
rolog library in this platform. If yo
u are sure it is installed, please op
en an issue.

[1]+ Stopped python
$ termux-chroot
$ python
Python 3.7.4 (default, Jul 28 2019, 2
2:40:01)
[Clang 8.0.7 (https://android.googles
ource.com/toolchain/clang b55f2d4ebfd
35bf6 on linux
Type "help", "copyright", "credits" o
r "license" for more information.

from pyswip import Prolog
swipl: Usage:
1) swipl [options] prolog-file ..
. [-- arg ...]
2) swipl [options] [-o executable
] -c prolog-file ...
3) swipl --help Display this
message (also -h)
4) swipl --version Display versi
on information
4) swipl --arch Display archi
tecture
6) swipl --dump-runtime-variables
[=format]
Dump link inf
o in sh(1) format

Options:
-x state Start fr
om state (must be first)
-g goal Run goal
(may be repeated)
-t toplevel Toplevel
goal
-f file User ini
tialisation file
-F file Site ini
tialisation file
-l file Script s
ource file
-s file Script s
ource file
-p alias=path Define f
ile search path 'alias'
-O Optimise
d compilation
--tty[=bool] (Dis)all
ow tty control
--signals[=bool] Do (not)
modify signal handling
--threads[=bool] Do (not)
allow for threads
--debug[=bool] Do (not)
generate debug info
--quiet[=bool] (-q) Do (not)
suppress informational messages
--traditional Disable
extensions of version 7
--home=DIR Use DIR
as SWI-Prolog home
--stack_limit=size[BKMG] Specify
maximum size of Prolog stacks
--table_space=size[BKMG] Specify
maximum size of SLG tables
--shared_table_space=size[BKMG] M
aximum size of shared SLG tables
--pce[=bool] Make the
xpce gui available
--pldoc[=port] Start Pl
Doc server [at port]

Boolean options may be written as --n
ame=bool, --name, --no-name or --nona
me
$

@woofwoof
Copy link
Author

woofwoof commented Oct 6, 2019

Please see pull request #67. Looks like the solution!

@yuce
Copy link
Owner

yuce commented Oct 7, 2019

This should be fixed in PySwip 0.2.9, which includes #67.

@yuce yuce closed this as completed Oct 7, 2019
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

2 participants