Forum Archive

Help with z3 in pythonista 3

kghector

Hi mega noob here to python.
Can anyone help me please.

I am running a specific script that uses z3 solver. (Searches seeds for a Pokémon game).

I have this script successfully working on pc. However I wished to make it portable so I didn’t need a pc with me.

Downloaded pythonista. Manually downloaded z3 solver from github.

Can find a way to import it to pythonista from my iCloud Drive.

Tried to use stash and use the pip install command, tried pip install z3 and also pip install z3-solver.

I have managed to get the script loading up via the pip commands however using the z3 I get and error on importing z3core.

When using z3-solver I get and error saying solver is no attribute ‘solver’

Any tips on how to use the module I downloaded or hot to get this z3 working correctly please?

raceback (most recent call last):
File "/private/var/mobile/Library/Mobile Documents/com~apple~CloudDocs/Downloads/RaidFinder-windows/raid_solver.py", line 179, in
if main() == False:
File "/private/var/mobile/Library/Mobile Documents/com~apple~CloudDocs/Downloads/RaidFinder-windows/raid_solver.py", line 174, in main
return searchInput()
File "/private/var/mobile/Library/Mobile Documents/com~apple~CloudDocs/Downloads/RaidFinder-windows/raid_solver.py", line 170, in searchInput
return search(ec, pid, ivs)
File "/private/var/mobile/Library/Mobile Documents/com~apple~CloudDocs/Downloads/RaidFinder-windows/raid_solver.py", line 137, in search
seeds = find_seeds(ec, pid)
File "/private/var/mobile/Library/Mobile Documents/com~apple~CloudDocs/Downloads/RaidFinder-windows/raid_solver.py", line 89, in find_seeds
solver = z3.Solver()
AttributeError: module 'z3' has no attribute 'Solver'

mikael

@kghector, looks like z3 has C components, which you cannot install on Pythonista due to Apple restrictions.