Open primimazza opened 1 year ago
Can you provide more about the error log?
C:\Users\Administrator>pip install deeprobust Requirement already satisfied: deeprobust in c:\users\administrator\appdata\local\programs\python\python310\lib\site-packages\deeprobust-0.2.7-py3.10.egg (0.2.7) Collecting matplotlib>=3.1.1 (from deeprobust) Using cached matplotlib-3.7.1-cp310-cp310-win_amd64.whl (7.6 MB) Requirement already satisfied: numpy>=1.17.1 in c:\users\administrator\appdata\local\programs\python\python310\lib\site-packages (from deeprobust) (1.23.4) Requirement already satisfied: torch>=1.2.0 in c:\users\administrator\appdata\local\programs\python\python310\lib\site-packages (from deeprobust) (2.0.1) Requirement already satisfied: scipy>=1.3.1 in c:\users\administrator\appdata\local\programs\python\python310\lib\site-packages (from deeprobust) (1.11.0) Collecting torchvision>=0.4.0 (from deeprobust) Using cached torchvision-0.15.2-cp310-cp310-win_amd64.whl (1.2 MB) Collecting texttable>=1.6.2 (from deeprobust) Using cached texttable-1.6.7-py2.py3-none-any.whl (10 kB) Requirement already satisfied: networkx>=2.4 in c:\users\administrator\appdata\local\programs\python\python310\lib\site-packages (from deeprobust) (3.1) Collecting numba>=0.48.0 (from deeprobust) Using cached numba-0.57.1-cp310-cp310-win_amd64.whl (2.5 MB) Collecting Pillow>=7.0.0 (from deeprobust) Using cached Pillow-9.5.0-cp310-cp310-win_amd64.whl (2.5 MB) Requirement already satisfied: scikit_learn>=0.22.1 in c:\users\administrator\appdata\local\programs\python\python310\lib\site-packages (from deeprobust) (1.2.2) Collecting scikit-image>=0.0 (from deeprobust) Using cached scikit_image-0.21.0-cp310-cp310-win_amd64.whl (22.8 MB) Collecting tensorboardX>=2.0 (from deeprobust) Using cached tensorboardX-2.6.1-py2.py3-none-any.whl (101 kB) Requirement already satisfied: tqdm>=3.0 in c:\users\administrator\appdata\local\programs\python\python310\lib\site-packages (from deeprobust) (4.65.0) Collecting gensim<4.0,>=3.8 (from deeprobust) Using cached gensim-3.8.3.tar.gz (23.4 MB) Installing build dependencies ... done Getting requirements to build wheel ... done Installing backend dependencies ... done Preparing metadata (pyproject.toml) ... error error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [55 lines of output]
running dist_info
creating C:\Users\Administrator\AppData\Local\Temp\pip-modern-metadata-xw8vksgb\gensim.egg-info
writing C:\Users\Administrator\AppData\Local\Temp\pip-modern-metadata-xw8vksgb\gensim.egg-info\PKG-INFO
writing dependency_links to C:\Users\Administrator\AppData\Local\Temp\pip-modern-metadata-xw8vksgb\gensim.egg-info\dependency_links.txt
writing requirements to C:\Users\Administrator\AppData\Local\Temp\pip-modern-metadata-xw8vksgb\gensim.egg-info\requires.txt
writing top-level names to C:\Users\Administrator\AppData\Local\Temp\pip-modern-metadata-xw8vksgb\gensim.egg-info\top_level.txt
writing manifest file 'C:\Users\Administrator\AppData\Local\Temp\pip-modern-metadata-xw8vksgb\gensim.egg-info\SOURCES.txt'
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 353, in
note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed
× Encountered error while generating package metadata. ╰─> See above for output.
note: This is an issue with the package mentioned above, not pip. hint: See above for details.
It seems that you are having a problem installing the gensim
pacalakge.
One solution is to install gensim
yourself on windows.
Then you need to modify the setup.py
file by removing the 'gensim':
https://github.com/DSE-MSU/DeepRobust/blob/122588ed0eb5599206544d091c663ed89a3bbdb0/setup.py#L18-L33
First clone this repository, then modifysetup.py
, and run python setup.py install
.
I tried to perform some solutions but the error persists C:\Users\Administrator>pip install gensim==3.8.3 Collecting gensim==3.8.3 Using cached gensim-3.8.3.tar.gz (23.4 MB) Installing build dependencies ... done Getting requirements to build wheel ... done Installing backend dependencies ... done Preparing metadata (pyproject.toml) ... error error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [55 lines of output]
running dist_info
creating C:\Users\Administrator\AppData\Local\Temp\pip-modern-metadata-2ya76pcn\gensim.egg-info
writing C:\Users\Administrator\AppData\Local\Temp\pip-modern-metadata-2ya76pcn\gensim.egg-info\PKG-INFO
writing dependency_links to C:\Users\Administrator\AppData\Local\Temp\pip-modern-metadata-2ya76pcn\gensim.egg-info\dependency_links.txt
writing requirements to C:\Users\Administrator\AppData\Local\Temp\pip-modern-metadata-2ya76pcn\gensim.egg-info\requires.txt
writing top-level names to C:\Users\Administrator\AppData\Local\Temp\pip-modern-metadata-2ya76pcn\gensim.egg-info\top_level.txt
writing manifest file 'C:\Users\Administrator\AppData\Local\Temp\pip-modern-metadata-2ya76pcn\gensim.egg-info\SOURCES.txt'
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 353, in
note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed
× Encountered error while generating package metadata. ╰─> See above for output.
note: This is an issue with the package mentioned above, not pip. hint: See above for details.
You may debug on how to install gensim in windows. Here is some answer from ChatGPT.
If the issue is hard to resolve, you can remove the file deeprobust/graph/defense/node_embedding.py which uses the gensim
package and install the deeprobust package by "python setup.py install".
@ChandlerBang Would you consider updating the version of gensim that is used in DeepRobust? This issue was fixed in gensim 4.3.0 (see https://github.com/RaRe-Technologies/gensim/releases/tag/4.3.0, with relevant issues https://github.com/RaRe-Technologies/gensim/issues/3225, https://github.com/RaRe-Technologies/gensim/issues/3362 and fix https://github.com/RaRe-Technologies/gensim/pull/3363).
They have also said that they will not fix it in the latest version of gensim that DeepRobust currently can use (3.8.3) since they are not supporting it anymore (https://github.com/RaRe-Technologies/gensim/pull/3386).
Since gensim is only used in one file in DeepRobust (https://github.com/DSE-MSU/DeepRobust/blob/d25d95b33724af9ab0385d5171c989f9b4ff2359/deeprobust/graph/defense/node_embedding.py) and the gensim API has only changed a little bit in the new version (https://github.com/RaRe-Technologies/gensim/wiki/Migrating-from-Gensim-3.x-to-4) I think it is very straightforward to achieve this. I'd be happy to prepare a PR for this if desired.
This fix would make it much easier to reliably share packages that depend on DeepRobust.
@fsherry Thanks so much for the suggestion, and I have updated the package dependencies!
I sincerely apologize for the late response as I missed this thread before.
note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed
× Encountered error while generating package metadata. ╰─> See above for output.
note: This is an issue with the package mentioned above, not pip. hint: See above for details.