dexsuite / dex-retargeting

https://yzqin.github.io/anyteleop/
MIT License
194 stars 23 forks source link

install error #35

Closed AII6 closed 1 month ago

AII6 commented 1 month ago

Hello, when I install this package using pip install dex-retargeting it has an error:

Preparing metadata (setup.py) ... error

error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [10 lines of output] /tmp/pip-install-9apmnek8/trimesh_b7eaff82dc1e4921a2762a9928bb7c20/setup.py:10: DeprecationWarning: Due to possible ambiguity, 'convert()' is deprecated and will be removed in pypandoc 1.8. Use 'convert_file()' or 'convert_text()'. long_description = pypandoc.convert('README.md', 'rst') Traceback (most recent call last): File "", line 2, in File "", line 34, in File "/tmp/pip-install-9apmnek8/trimesh_b7eaff82dc1e4921a2762a9928bb7c20/setup.py", line 10, in long_description = pypandoc.convert('README.md', 'rst') File "/home/aios/anaconda3/envs/embodyAI/lib/python3.9/site-packages/pypandoc/init.py", line 65, in convert raise RuntimeError("Format missing, but need one (identified source as text as no " RuntimeError: Format missing, but need one (identified source as text as no file with that name was found). [end of output]

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.

I tried other versions of pypandoc but it did not work. Before this error it searched many versions of package trimesh. How to solve it?

AII6 commented 1 month ago

And the version of python is 3.9.19

giuliano-97 commented 1 month ago

This is because the version of the dependencies in the setup.py is not fixed, which causes pip to pull all possible versions of trimesh (and other libraries) to find the right combination, which eventually results in this error. It can be fixed by patching the setup.py with specific dependencies versions e.g. with Python 3.10 and pip 24.2 I did:

diff --git a/setup.py b/setup.py
index 8e5a66d..729f5c9 100644
--- a/setup.py
+++ b/setup.py
@@ -17,14 +17,14 @@ with open(_here / name / "__init__.py") as f:
         raise RuntimeError("Unable to find __version__ string.")

 core_requirements = [
-    "numpy",
-    "pytransform3d",
+    "numpy>=1.21.0",
+    "pytransform3d>=3.5.0",
     "pin>=2.7.0",
-    "nlopt",
-    "trimesh",
-    "anytree",
-    "pyyaml",
-    "lxml",
+    "nlopt>=2.6.1",
+    "trimesh>=4.4.0",
+    "anytree>=2.12.0",
+    "pyyaml>=6.0.0",
+    "lxml>=5.3.0",
 ]
yzqin commented 1 month ago

This is because the version of the dependencies in the setup.py is not fixed, which causes pip to pull all possible versions of trimesh (and other libraries) to find the right combination, which eventually results in this error. It can be fixed by patching the setup.py with specific dependencies versions e.g. with Python 3.10 and pip 24.2 I did:

diff --git a/setup.py b/setup.py
index 8e5a66d..729f5c9 100644
--- a/setup.py
+++ b/setup.py
@@ -17,14 +17,14 @@ with open(_here / name / "__init__.py") as f:
         raise RuntimeError("Unable to find __version__ string.")

 core_requirements = [
-    "numpy",
-    "pytransform3d",
+    "numpy>=1.21.0",
+    "pytransform3d>=3.5.0",
     "pin>=2.7.0",
-    "nlopt",
-    "trimesh",
-    "anytree",
-    "pyyaml",
-    "lxml",
+    "nlopt>=2.6.1",
+    "trimesh>=4.4.0",
+    "anytree>=2.12.0",
+    "pyyaml>=6.0.0",
+    "lxml>=5.3.0",
 ]

Thanks for the suggestion from @giuliano-97 , i have applied this change in the commit! Appreciate for the help!