cjdrake / boolexpr

Boolean Expressions
Apache License 2.0
19 stars 4 forks source link

windows 10 python 3.6.5 import error #31

Open 7763sea opened 6 years ago

7763sea commented 6 years ago

import boolexpr Traceback (most recent call last): File "", line 1, in File "C:\Program Files\Python36\lib\site-packages\boolexpr__init__.py", line 281, in lib = ffi.dlopen(libpath) File "C:\Program Files\Python36\lib\site-packages\cffi\api.py", line 141, in dlopen lib, function_cache = _make_ffi_library(self, name, flags) File "C:\Program Files\Python36\lib\site-packages\cffi\api.py", line 802, in _make_ffi_library backendlib = _load_backend_lib(backend, libname, flags) File "C:\Program Files\Python36\lib\site-packages\cffi\api.py", line 798, in _load_backend_lib return backend.load_library(path, flags) OSError: cannot load library 'C:\Program Files\Python36\lib\site-packages\boolexpr_boolexpr.cp36-win_amd64.pyd': error 0x7e

cjdrake commented 6 years ago

I don't have a Windows development machine at the moment, so can't help out.

7763sea commented 6 years ago

ok,thanks。

7763sea commented 6 years ago

The project is great, but there are too few people to pay attention to. Thank you for your contribution How to dump large variable,i use numpy.savez and pickle.dump,was failed.

Traceback (most recent call last): File "*.py", line 19, in **(t,20) File "/home/*/Desktop/sat/cnf/.py", line 80, in ** pickle.dump(tmp, f, 0) File "/usr/lib/python3.5/copyreg.py", line 65, in _reduce_ex raise TypeError("can't pickle %s objects" % base.name) TypeError: can't pickle CData objects

cjdrake commented 6 years ago

I remember quite a while ago someone else asked me about pickling. The C++/Python interface makes it a bit complicated to pull off; you might want to look into other ways of doing serialization. For example, the from_ast and to_ast methods convert expressions to/from a more generic data structure.

7763sea commented 6 years ago

to_ast is slow ,to_dot success,but less than optmal