0

I have installed pySMT for Python 3.12 using PyCharm package manager with a conda environment in Ubuntu 22.04.5 LTS:

$ pip show pysmt

Name: PySMT
Version: 0.9.6
Summary: A solver-agnostic library for SMT Formulae manipulation and solving
Home-page: http://www.pysmt.org
Author: PySMT Team
Author-email: [email protected]
License: APACHE
Location: .../lib/python3.12/site-packages
Requires: 
Required-by: 

However, if I try to install a solver, or, for example, "show you which solvers have been found in your PYTHONPATH", I get a SetuptoolsDeprecationWarning:

$ pysmt-install --check

.../lib/python3.12/site-packages/setuptools/_distutils/cmd.py:79: SetuptoolsDeprecationWarning: setup.py install is deprecated.
!!

        ********************************************************************************
        Please avoid running ``setup.py`` directly.
        Instead, use pypa/build, pypa/installer or other
        standards-based tools.

        See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
        ********************************************************************************

!!
  self.initialize_options()
Traceback (most recent call last):
...
FileExistsError: [Errno 17] File exists: '.../miniforge3/envs/.../bin/python3.12'

What am I missing? Why would pysmt-install use the deprecated setup.py?

Perplexity suggested to pip install --upgrade setuptools but I'm not convinced.

Edit: There is one similar open issue in the pySMT Github repo but it is related to MacOS with M1:

Cannot install msat solver on MacOs with M1

1 Answer 1

1

What am I missing?

I don't know – is there an error here that you're trying to solve? What you're seeing is a warning that's saying, well, exactly what it's saying, that projects these days should use PEP 517 builds.

Why would pysmt-install use the deprecated setup.py?

Because that's what it's written to do (1, 2).

There's a whole bunch of grody patching going on in those installers anyway, and looks like those "sub-packages" just haven't been updated to use modern build methods.

Sign up to request clarification or add additional context in comments.

5 Comments

Ah, ok, so the actual error is of course the FileExistsError (see the last line of the error print), which might not have nothing to do with the deprecation warning..? Thus, I probably should ask another question about the FileExistsError, which prevents me from installing solvers. That might be related to the Python version (3.12).
Yeah, that's a separate question. If you're using a Conda environment, you may want the Conda-packaged pysmt (see instructions over here).
I actually tried both, the conda package (miniforge) and PyPI, but both produced the same error.
Yes, the problem was Python 3.12. After downgrading to 3.10, it seems to work. Probably not worth a another question (pySMT will get upgraded).
Glad you found a solution. However, 3.12 isn't even the newest released Python... 😀

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.