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

Can not find SWI-Prolog installed in ubuntu #35

Closed
ghost opened this issue Jun 11, 2018 · 5 comments
Closed

Can not find SWI-Prolog installed in ubuntu #35

ghost opened this issue Jun 11, 2018 · 5 comments

Comments

@ghost
Copy link

ghost commented Jun 11, 2018

When I change the code to cmd = Popen(['swipl', '--dump-runtime-variables'], stdout=PIPE), it works.

@PaulBrownMagic
Copy link
Contributor

Same on CentOS, also a linux one.

@yuce
Copy link
Owner

yuce commented Dec 8, 2018

@rylanchiu Can you give more information about your environment:

  • What's the version of Ubuntu you are using?
  • What's the version of SWI-prolog you are using?
  • What's the Python version?
  • Are you using SWI-Prolog from the package manager?

At least on 18.04 there's no problem using pyswip 0.2.7 (latest published on PyPI) with SWI-Prolog 7.6.4

@PaulBrownMagic The SWI-Prolog executable is different in latest versions. Can you check whether you have /usr/bin/swipl on your system? If not creating a symbolink link to that path may help.

@alvarogunawan
Copy link

Ran into the same problem and fixed it the same way as @rylanchiu. I'm using the following environment:

Hope this helps

@JoelBender
Copy link

Similar problem, Ubuntu 16.04, SWI-Prolog version 8.0.1 for x86_64-linux, I found the .so file in the /usr/lib directory. I fixed it by creating a local lib directory and symlinking:

    $ mkdir lib
    $ pushd lib
    $ ln -s /usr/lib/swi-prolog/lib/x86_64-linux/libswipl.so .
    $ popd

I noticed that when importing like from pyswip import Prolog the usage message like 1) swipl [options] prolog-file ... [-- arg ...] is printed out. I'm obviously just starting out, but this is going to be awesome... :-)

@ghost ghost mentioned this issue Feb 19, 2019
@yuce
Copy link
Owner

yuce commented Feb 20, 2019

Fixed by #44

@yuce yuce closed this as completed Feb 20, 2019
g-gemignani pushed a commit to magazino/pyswip that referenced this issue Jul 2, 2020
I followed by @rylanchiu here yuce#35 (comment) when having errors with the MacOS installation test example. It turns out there were missing hyphens in the arguments to the Popen for swipl. Now that exanoke works for me.
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

4 participants