Git Product home page Git Product logo

Comments (4)

hakank avatar hakank commented on August 25, 2024

I asked about downgrading at the SWI Prolog forum: https://swi-prolog.discourse.group/t/best-easiest-way-to-downgrade-to-version-8-4-3-on-linux-ubuntu-20-04/5966 .

For me it worked by downloading the appropriate .deb files from https://launchpad.net/~swi-prolog/+archive/ubuntu/stable/+build/24099974 (the focal distribution for Ubuntu 20.05) and then installing them in correct order:

sudo dpkg -i swi-prolog-nox_8.4.3-1-g10c53c6e3-focalppa2_amd64.deb
sudo dpkg -i swi-prolog-x_8.4.3-1-g10c53c6e3-focalppa2_amd64.deb
sudo dpkg -i swi-prolog_8.4.3-1-g10c53c6e3-focalppa2_amd64.deb

Even if this fix works, it's an issue that I hope will be fixed so we can use the current stable SWI Prolog version.

from popper.

hakank avatar hakank commented on August 25, 2024

There is a simple fix that seems to solve the problem (which I reported in https://swi-prolog.discourse.group/t/best-easiest-way-to-downgrade-to-version-8-4-3-on-linux-ubuntu-20-04/5966/9), namely to change the pyswip source according to this diff:

diff --git a/pyswip/core.py b/pyswip/core.py
index 33f7035..0bb992f 100644
--- a/pyswip/core.py
+++ b/pyswip/core.py
@@ -584,7 +584,7 @@ PL_VERSION_VM               =6      # VM signature
 PL_VERSION_BUILT_IN    =7      # Built-in predicate signature
 
 try:
-    PL_version = _lib.PL_version
+    PL_version = _lib.PL_version_info
     PL_version.argtypes = [c_int]
     PL_version.restype = c_uint

So now Popper works with SWI Prolog version 9.0.0 (stable PPA version).

(This was inspired by the PR 133 at pyswip: yuce/pyswip#133 )

from popper.

youssefmahmoud89 avatar youssefmahmoud89 commented on August 25, 2024

Posting my simple solution here:

I faced the same issue on my Mac M1. When i upgraded Prolog I faced the same issue. Popper was not working any more.

I had installed pyswip through Homebrew. All I had to do was:

locate pyswip core.py file:
for me it was in /opt/homebrew/lib/python3.10/site-packages/pyswip

change PL_version = _lib.PL_version (in line 587)
to PL_version = _lib.PL_version_info

This got Popper working again

Solution inspired by (https://swi-prolog.discourse.group/t/best-easiest-way-to-downgrade-to-version-8-4-3-on-linux-ubuntu-20-04/5966/18)

from popper.

andrewcropper avatar andrewcropper commented on August 25, 2024

@hakank @youssefmahmoud89

Thanks for posting this issue. The master branch of pyswip now works correctly with the latest version of Prolog.

from popper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.