Closed daveuu closed 8 years ago
This is great! Pardon my excitement that you're the first person (that I know of) to try the python bindings of parasail!
Looks like parasail works with Python 2 but not 3. I will fix this. I don't have a lot of experience with Python 3 but I want to get this working for both of them.
I don't know the best practices for using ctypes with C libraries. I recall reading about the pitfalls of trying to locate libraries but this appears to be the problem for you? I think my README is not up to date. I will also look into making it easier to find and load the parasail library.
Stay tuned... and thanks for providing an issue report instead of simply shrugging your shoulders and moving on.
Hi David,
It looks like this was caused by Python3 using unicode and my incorrect assumption that byte strings would be used with my code as it is done in Python2.
I found advice on http://python3porting.com/problems.html says to use a b() function that wraps the strings passed to the parasail functions, converting to bytes if Py3 and leaving them alone if Py2. I just pushed the commit 6ef26b4cd3781c992fef45e0672a3ada4527b2f2. I installed python3 on my mac laptop and tried it out and I was able to use it.
As for the PREFIX issue. Still working on the best way to locate the parasail library during start-up.
I have updated the README.rst (renamed from README.md) with installation details. Also, the example incorrectly used negative values for the gap open and extension penalties. PREFIX is no longer used so please see the README.rst for details.
Hi Jeff
Install via pip works perfectly for me now in Python2 and Python3 (sorry for slow response crazy couple of weeks . . .)
thanks.
Python 3.5.1 (default, Mar 3 2016, 09:29:07) Type "copyright", "credits" or "license" for more information.
Thanks. I should say I had to edit
parasail/__init__.py
and hard wire the path tolibparasail.so
because settingLD_LIBRARY_PATH=$PREFIX/lib
(withPREFIX
correct) ended with an import error: