Closed ivan-marroquin closed 3 years ago
I decided to try a manual installation. So, I downloaded the package and run command: python setup.py install
It seems that the process went well. But, I got these warning messages which I don't know if they compromised the installation:
File "build\bdist.win-amd64\egg\skhubness\reduction\dis_sim.py", line 4 from future import annotations
SyntaxError: future feature annotations is not defined
byte-compiling build\bdist.win-amd64\egg\skhubness\reduction\local_scaling.py to local_scaling.cpython-36.pyc File "build\bdist.win-amd64\egg\skhubness\reduction\local_scaling.py", line 4 from future import annotations
SyntaxError: future feature annotations is not defined
byte-compiling build\bdist.win-amd64\egg\skhubness\reduction\mutual_proximity.py to mutual_proximity.cpython-36.pyc File "build\bdist.win-amd64\egg\skhubness\reduction\mutual_proximity.py", line 4 from future import annotations
SyntaxError: future feature annotations is not defined
byte-compiling build\bdist.win-amd64\egg\skhubness\reduction\shared_neighbors.py to shared_neighbors.cpython-36.pyc File "build\bdist.win-amd64\egg\skhubness\reduction\shared_neighbors.py", line 4 from future import annotations
SyntaxError: future feature annotations is not defined
Extracting scikit_hubness-0.21.3-py3.6.egg to c:\temp\python\python3.6.5\lib\site-packages File "c:\temp\python\python3.6.5\lib\site-packages\scikit_hubness-0.21.3-py3.6.egg\skhubness\analysis\estimation.py", line 15 from future import annotations
SyntaxError: future feature annotations is not defined
File "c:\temp\python\python3.6.5\lib\site-packages\scikit_hubness-0.21.3-py3.6.egg\skhubness\neighbors\hnsw.py", line 5 from future import annotations
SyntaxError: future feature annotations is not defined
File "c:\temp\python\python3.6.5\lib\site-packages\scikit_hubness-0.21.3-py3.6.egg\skhubness\neighbors\lof.py", line 7 from future import annotations
SyntaxError: future feature annotations is not defined
File "c:\temp\python\python3.6.5\lib\site-packages\scikit_hubness-0.21.3-py3.6.egg\skhubness\neighbors\lsh.py", line 5 from future import annotations
SyntaxError: future feature annotations is not defined
File "c:\temp\python\python3.6.5\lib\site-packages\scikit_hubness-0.21.3-py3.6.egg\skhubness\neighbors\nng.py", line 5 from future import annotations
SyntaxError: future feature annotations is not defined
File "c:\temp\python\python3.6.5\lib\site-packages\scikit_hubness-0.21.3-py3.6.egg\skhubness\neighbors\random_projection_trees.py", line 6 from future import annotations
SyntaxError: future feature annotations is not defined
File "c:\temp\python\python3.6.5\lib\site-packages\scikit_hubness-0.21.3-py3.6.egg\skhubness\reduction\dis_sim.py", line 4 from future import annotations
SyntaxError: future feature annotations is not defined
File "c:\temp\python\python3.6.5\lib\site-packages\scikit_hubness-0.21.3-py3.6.egg\skhubness\reduction\local_scaling.py", line 4 from future import annotations
SyntaxError: future feature annotations is not defined
File "c:\temp\python\python3.6.5\lib\site-packages\scikit_hubness-0.21.3-py3.6.egg\skhubness\reduction\mutual_proximity.py", line 4 from future import annotations
SyntaxError: future feature annotations is not defined
File "c:\temp\python\python3.6.5\lib\site-packages\scikit_hubness-0.21.3-py3.6.egg\skhubness\reduction\shared_neighbors.py", line 4 from future import annotations
SyntaxError: future feature annotations is not defined
scikit-hubness requires Python>=3.7, which introduced from __future__ import annotation
.
Is creating a virtual environment or conda environment with python3.7 an option for you?
Thanks for the information. I will keep this in mind. Unfortunately, it won't possible for me to develop code on Python 3.7 as we are still using Python 3.6.5
It shouldn't be too hard to make a 3.6 compatible fork though. Just delete all the imports highlighted in your error message above, and remove the annotations that point to the class itself, e.g. def fit(self, X, y=None) -> HNSW
would become def fit(self, X, y=None):
and so on.
This does not change functionality, but only loses convenient typing hints in IDEs.
Many thanks for sharing these tips. I will give it a try and let you know
I gave a try. I made a change in the setup.py, so the installation makes use of scikit-learn 0.24.2. The compilation seemed to work well. However, when I tried this command:
from skhubness.data import load_dexter
gave the following error message:
Traceback (most recent call last):
File "
To correct this issue, I did the following:
Now, I am getting this error message - I reported this error to scikit-learn package:
File "C:\Users\IMarroquin\Downloads\Important_Python_Libraries_VisualBuildTools\scikit-hubness-master\skhubness\neighbors\base.py", line 29, in
Unfortunately, you cannot easily upgrade scikit-learn, as scikit-hubness is currently tightly bound to some of its internals. For new scikit-learn version, we essentially need to rewrite our tool from scratch (see the paper for some more details on that).
Ok. I replaced the new scikit-learn by the version supported by scikit-hubness. the compilation worked
Hi,
I have a windows machine with Python 3.6.5, I tried the command: pip install scikit-hubness
and I got this message:
Collecting scikit-hubness Could not find a version that satisfies the requirement scikit-hubness (from versions: ) No matching distribution found for scikit-hubness
Any suggestions?
Thanks,
Ivan