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

Issue while using clingo with asprin #13

Open
PaoloPangallo opened this issue Jul 30, 2024 · 6 comments
Open

Issue while using clingo with asprin #13

PaoloPangallo opened this issue Jul 30, 2024 · 6 comments

Comments

@PaoloPangallo
Copy link

I have clingo 5.7.1 and asprin 3.1.0 and it seems that I can t run asprin proprerly
image

the same error shows up when i try to run the followingcode on pycharm :

import sys
print("Python version:")
print(sys.version)

try:
import clingo
print("Clingo imported successfully")
print("Clingo version:")
print(clingo.version)
except ImportError as e:
print("Failed to import clingo:", e)

import subprocess

def run_asprin():
try:
result = subprocess.run(['asprin', '--version'], capture_output=True, text=True, check=True)
print("Asprin ok, output:")
print(result.stdout)
except subprocess.CalledProcessError as e:
print("Error:", e)
print("stdout:", e.stdout)
print("stderr:", e.stderr)
except Exception as e:
print("Unexpected error", e)

run_asprin()

image

@rkaminsk
Copy link
Member

I don't think this has anything to do with clingo. It might be that you have to use an older version. I'll transfer the issue to the asprin repo.

@rkaminsk rkaminsk transferred this issue from potassco/clingo Jul 30, 2024
@tortinator
Copy link
Member

tortinator commented Jul 30, 2024

Yes @PaoloPangallo , you are right! We are just restarting to refactor asprin, but AFAIK it works fine in the settings given in the README:

asprin has been tested with Python 2.7.13 and 3.5.3, using clingo 5.4.0.

@PaoloPangallo
Copy link
Author

I have issues installing your configuration because clingo 5.4.0 doesnt work with the python version given, what do you suggest?

image

@rkaminsk
Copy link
Member

rkaminsk commented Aug 2, 2024

I have issues installing your configuration because clingo 5.4.0 doesnt work with the python version given, what do you suggest?

I would use at least python 3.8. Anything before is end of life. Most likely asprin will work with that too.

@tortinator
Copy link
Member

I'm afraid we need to wait for this until @javier-romero is. Ack from vacation

@javier-romero
Copy link
Collaborator

Hi @PaoloPangallo,

I am not sure about what is the problem in your case.

In my machine it works well with the versions of the README.
For example, using conda:

conda create -n asprin -c conda-forge -c potassco python=3.5.3 clingo=5.4.0 asprin

These other installations (with other Python versions) should also work:

conda create -c potassco -n asprin python=3.7 clingo=5.4 asprin=3.1
conda create --strict-channel-priority -c conda-forge -c potassco -n asprin python=3.9 clingo=5.4 asprin=3.1

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