Comments (4)
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.
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.
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.
Thanks for posting this issue. The master branch of pyswip now works correctly with the latest version of Prolog.
from popper.
Related Issues (20)
- Get all positive and negative examples HOT 2
- "PL_put_chars: Assertion failed: 0" probably due to an automatic upgrade of swi-prolog HOT 2
- Can Popper performs incrementally learning? HOT 3
- A strange behavior when adding extra ASP constraints to pruning by `clause` HOT 6
- Index Out of Range Error HOT 1
- invoking popper from another python program HOT 4
- bkcons filepath HOT 1
- `explain` always true when invoked from commandline HOT 1
- Possible optimization (if not a bug): should the sub programs in the explainer also follow the constraint? HOT 1
- Some of the predicate invention examples don't work in latest version
- Can Popper count? HOT 3
- What're the constraints of mutual recursion in PI?
- Adding test examples HOT 1
- It seems that Popper can't find a rule for increment by one HOT 6
- Can Popper generalize? HOT 8
- Overfitting and wrong solution in 'find-dupl' example. HOT 2
- Error in the testing phase popper HOT 3
- Maybe a bug in Popper/bin /popper-ilp HOT 2
- KeyError, but sometimes solution, without changing things HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from popper.