-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python 3 support #1
Comments
Thank you so much for this! There's also another Exception in hdf5_dataset in line 85 that needs a syntax fix |
I run sudo 2to3 -w [pyflann directory in dist-packages] and worked. |
I tried following the instructions above, but I still got an error. It would be helpful to others I imagine if you could open up the Python3 branch of this so others could just install those files directly. |
@jimkon's solution works for me on OSX (10.14.4) with Python 3.7.4. I installed via pip, and then needed to specify an exception type for line 65 of binary_dataset.py: 63. else:
64. if rows==-1 or cols==-1:
65. # raise "No .meta file present, you must specify dataset rows, cols asd dtype")
66. raise ValueError("No .meta file present, you must specify dataset rows, cols asd dtype") |
I followed the instructions but I am getting this error
|
@abdor95 I also got this error. After some debug I found the exact error for me: I am running on a new M chip macbook. If you had the same issue and found a solution let me know. I am going to build my project on an old intel macbook for now and look at migrating later. |
Hi, Do you happen to find a solution for the M chip issue |
This is old news, but I posted a solution to ^ here: https://github.com/ddarmon/sidpy/#installation-on-arm-based-macs |
Hi,
I'm getting some errors when using Python 3 (3.4.3) (and installing from pip, pyflann 1.6.12).
I'm getting import errors due to relative imports. The solution is to replace various
from foo import *
withfrom .foo import *
.See also here
(This should also work in Python 2.)
specifically:
_dataset
imports in io/dataset.py need to be relative as well, e.gfrom . import binary_dataset
after fixing these, I get invalid syntax in find_ctypes.py, line 151. The reason is that the
except Exception, e
syntax was replaced byexcept Exception as e:
.In this case, it could just be
except Exception:
same in io/dataset.py, line 61 and hdf5_dataset, line 34+67
in flann_ctypes, line 201, the
exec
call needs bracketsPython 3 no longer contains
dict.iteritems
and should be replaced by dict.items (in flann_ctypes, l.53 and 78)(Not sure if this is the right place for these issues, I just followed the pip package to its source.)
Some additional errors which I'm not sure are the fault of Python 3:
With these fixes, pyflann seems to work.
The text was updated successfully, but these errors were encountered: