pysmt z3 solver crashing?












0















I am having trouble with the pysmt solvers. I am getting the following error message:



AttributeError: 'module' object has no attribute 'Z3_mk_and'


whenever I try to both:
(1) Instantiate a solver via Solver() and
(2) Run pysmt-install --check



Here is the full stack trace, incited from method 1:



Traceback (most recent call last):
File "ex.py", line 15, in <module>
solver = s.Solver()
File "/Users/harper/anaconda2/lib/python2.7/site-packages/pysmt/shortcuts.py", line 910, in Solver
return get_env().factory.Solver(name=name,
File "/Users/harper/anaconda2/lib/python2.7/site-packages/pysmt/environment.py", line 158, in factory
self._factory = pysmt.factory.Factory(self)
File "/Users/harper/anaconda2/lib/python2.7/site-packages/pysmt/factory.py", line 86, in __init__
self._get_available_solvers()
File "/Users/harper/anaconda2/lib/python2.7/site-packages/pysmt/factory.py", line 222, in _get_available_solvers
from pysmt.solvers.z3 import Z3Solver
File "/Users/harper/anaconda2/lib/python2.7/site-packages/pysmt/solvers/z3.py", line 295, in <module>
class Z3Converter(Converter, DagWalker):
File "/Users/harper/anaconda2/lib/python2.7/site-packages/pysmt/solvers/z3.py", line 859, in Z3Converter
walk_and = make_walk_nary(z3.Z3_mk_and)
AttributeError: 'module' object has no attribute 'Z3_mk_and'


I've tried so much to fix this, like uninstalling and reinstalling z3 (supposedly successfully), and pip installing z3-solver (which fails), and I can't figure out what's wrong.










share|improve this question



























    0















    I am having trouble with the pysmt solvers. I am getting the following error message:



    AttributeError: 'module' object has no attribute 'Z3_mk_and'


    whenever I try to both:
    (1) Instantiate a solver via Solver() and
    (2) Run pysmt-install --check



    Here is the full stack trace, incited from method 1:



    Traceback (most recent call last):
    File "ex.py", line 15, in <module>
    solver = s.Solver()
    File "/Users/harper/anaconda2/lib/python2.7/site-packages/pysmt/shortcuts.py", line 910, in Solver
    return get_env().factory.Solver(name=name,
    File "/Users/harper/anaconda2/lib/python2.7/site-packages/pysmt/environment.py", line 158, in factory
    self._factory = pysmt.factory.Factory(self)
    File "/Users/harper/anaconda2/lib/python2.7/site-packages/pysmt/factory.py", line 86, in __init__
    self._get_available_solvers()
    File "/Users/harper/anaconda2/lib/python2.7/site-packages/pysmt/factory.py", line 222, in _get_available_solvers
    from pysmt.solvers.z3 import Z3Solver
    File "/Users/harper/anaconda2/lib/python2.7/site-packages/pysmt/solvers/z3.py", line 295, in <module>
    class Z3Converter(Converter, DagWalker):
    File "/Users/harper/anaconda2/lib/python2.7/site-packages/pysmt/solvers/z3.py", line 859, in Z3Converter
    walk_and = make_walk_nary(z3.Z3_mk_and)
    AttributeError: 'module' object has no attribute 'Z3_mk_and'


    I've tried so much to fix this, like uninstalling and reinstalling z3 (supposedly successfully), and pip installing z3-solver (which fails), and I can't figure out what's wrong.










    share|improve this question

























      0












      0








      0








      I am having trouble with the pysmt solvers. I am getting the following error message:



      AttributeError: 'module' object has no attribute 'Z3_mk_and'


      whenever I try to both:
      (1) Instantiate a solver via Solver() and
      (2) Run pysmt-install --check



      Here is the full stack trace, incited from method 1:



      Traceback (most recent call last):
      File "ex.py", line 15, in <module>
      solver = s.Solver()
      File "/Users/harper/anaconda2/lib/python2.7/site-packages/pysmt/shortcuts.py", line 910, in Solver
      return get_env().factory.Solver(name=name,
      File "/Users/harper/anaconda2/lib/python2.7/site-packages/pysmt/environment.py", line 158, in factory
      self._factory = pysmt.factory.Factory(self)
      File "/Users/harper/anaconda2/lib/python2.7/site-packages/pysmt/factory.py", line 86, in __init__
      self._get_available_solvers()
      File "/Users/harper/anaconda2/lib/python2.7/site-packages/pysmt/factory.py", line 222, in _get_available_solvers
      from pysmt.solvers.z3 import Z3Solver
      File "/Users/harper/anaconda2/lib/python2.7/site-packages/pysmt/solvers/z3.py", line 295, in <module>
      class Z3Converter(Converter, DagWalker):
      File "/Users/harper/anaconda2/lib/python2.7/site-packages/pysmt/solvers/z3.py", line 859, in Z3Converter
      walk_and = make_walk_nary(z3.Z3_mk_and)
      AttributeError: 'module' object has no attribute 'Z3_mk_and'


      I've tried so much to fix this, like uninstalling and reinstalling z3 (supposedly successfully), and pip installing z3-solver (which fails), and I can't figure out what's wrong.










      share|improve this question














      I am having trouble with the pysmt solvers. I am getting the following error message:



      AttributeError: 'module' object has no attribute 'Z3_mk_and'


      whenever I try to both:
      (1) Instantiate a solver via Solver() and
      (2) Run pysmt-install --check



      Here is the full stack trace, incited from method 1:



      Traceback (most recent call last):
      File "ex.py", line 15, in <module>
      solver = s.Solver()
      File "/Users/harper/anaconda2/lib/python2.7/site-packages/pysmt/shortcuts.py", line 910, in Solver
      return get_env().factory.Solver(name=name,
      File "/Users/harper/anaconda2/lib/python2.7/site-packages/pysmt/environment.py", line 158, in factory
      self._factory = pysmt.factory.Factory(self)
      File "/Users/harper/anaconda2/lib/python2.7/site-packages/pysmt/factory.py", line 86, in __init__
      self._get_available_solvers()
      File "/Users/harper/anaconda2/lib/python2.7/site-packages/pysmt/factory.py", line 222, in _get_available_solvers
      from pysmt.solvers.z3 import Z3Solver
      File "/Users/harper/anaconda2/lib/python2.7/site-packages/pysmt/solvers/z3.py", line 295, in <module>
      class Z3Converter(Converter, DagWalker):
      File "/Users/harper/anaconda2/lib/python2.7/site-packages/pysmt/solvers/z3.py", line 859, in Z3Converter
      walk_and = make_walk_nary(z3.Z3_mk_and)
      AttributeError: 'module' object has no attribute 'Z3_mk_and'


      I've tried so much to fix this, like uninstalling and reinstalling z3 (supposedly successfully), and pip installing z3-solver (which fails), and I can't figure out what's wrong.







      python python-2.7 z3 solver smt






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 20 '18 at 19:20









      HSCHSC

      11




      11
























          2 Answers
          2






          active

          oldest

          votes


















          1














          Please note that the proper way to install a solver for pysmt is through pysmt-install. This guarantees that the version of the solver has been tested.






          share|improve this answer































            0














            This has nothing really to do with z3; but rather directly with pysmt itself. Most likely pysmt isn't keeping up-to-date with changes in z3. You should file a ticket directly at their site: https://github.com/pysmt/pysmt/issues






            share|improve this answer























              Your Answer






              StackExchange.ifUsing("editor", function () {
              StackExchange.using("externalEditor", function () {
              StackExchange.using("snippets", function () {
              StackExchange.snippets.init();
              });
              });
              }, "code-snippets");

              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "1"
              };
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function() {
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled) {
              StackExchange.using("snippets", function() {
              createEditor();
              });
              }
              else {
              createEditor();
              }
              });

              function createEditor() {
              StackExchange.prepareEditor({
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader: {
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              },
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              });


              }
              });














              draft saved

              draft discarded


















              StackExchange.ready(
              function () {
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53400079%2fpysmt-z3-solver-crashing%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              1














              Please note that the proper way to install a solver for pysmt is through pysmt-install. This guarantees that the version of the solver has been tested.






              share|improve this answer




























                1














                Please note that the proper way to install a solver for pysmt is through pysmt-install. This guarantees that the version of the solver has been tested.






                share|improve this answer


























                  1












                  1








                  1







                  Please note that the proper way to install a solver for pysmt is through pysmt-install. This guarantees that the version of the solver has been tested.






                  share|improve this answer













                  Please note that the proper way to install a solver for pysmt is through pysmt-install. This guarantees that the version of the solver has been tested.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Nov 24 '18 at 13:44









                  MarcoMarco

                  20612




                  20612

























                      0














                      This has nothing really to do with z3; but rather directly with pysmt itself. Most likely pysmt isn't keeping up-to-date with changes in z3. You should file a ticket directly at their site: https://github.com/pysmt/pysmt/issues






                      share|improve this answer




























                        0














                        This has nothing really to do with z3; but rather directly with pysmt itself. Most likely pysmt isn't keeping up-to-date with changes in z3. You should file a ticket directly at their site: https://github.com/pysmt/pysmt/issues






                        share|improve this answer


























                          0












                          0








                          0







                          This has nothing really to do with z3; but rather directly with pysmt itself. Most likely pysmt isn't keeping up-to-date with changes in z3. You should file a ticket directly at their site: https://github.com/pysmt/pysmt/issues






                          share|improve this answer













                          This has nothing really to do with z3; but rather directly with pysmt itself. Most likely pysmt isn't keeping up-to-date with changes in z3. You should file a ticket directly at their site: https://github.com/pysmt/pysmt/issues







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Nov 20 '18 at 19:33









                          Levent ErkokLevent Erkok

                          7,19611027




                          7,19611027






























                              draft saved

                              draft discarded




















































                              Thanks for contributing an answer to Stack Overflow!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid



                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.


                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function () {
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53400079%2fpysmt-z3-solver-crashing%23new-answer', 'question_page');
                              }
                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              Paul Cézanne

                              UIScrollView CustomStickyHeader Resize height generates problems when scroll is too fast

                              Angular material date-picker (MatDatepicker) auto completes the date on focus out