diff --git a/INSTALL.md b/INSTALL.md index 9172ef69a..ecc915adc 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -96,10 +96,11 @@ In general, from inside IPython, or in Google Colab or a jupyter notebook, you c ``` import sys import torch +pyt_version_str=torch.__version__.split("+")[0].replace(".", "") version_str="".join([ f"py3{sys.version_info.minor}_cu", torch.version.cuda.replace(".",""), - f"_pyt{torch.__version__[0:5:2]}" + f"_pyt{pyt_version_str}" ]) !pip install pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html ``` diff --git a/docs/tutorials/bundle_adjustment.ipynb b/docs/tutorials/bundle_adjustment.ipynb index 05ab505a6..6fa744507 100644 --- a/docs/tutorials/bundle_adjustment.ipynb +++ b/docs/tutorials/bundle_adjustment.ipynb @@ -91,10 +91,11 @@ "if need_pytorch3d:\n", " if torch.__version__.startswith(\"1.10.\") and sys.platform.startswith(\"linux\"):\n", " # We try to install PyTorch3D via a released wheel.\n", + " pyt_version_str=torch.__version__.split(\"+\")[0].replace(\".\", \"\")\n", " version_str=\"\".join([\n", " f\"py3{sys.version_info.minor}_cu\",\n", " torch.version.cuda.replace(\".\",\"\"),\n", - " f\"_pyt{torch.__version__[0:5:2]}\"\n", + " f\"_pyt{pyt_version_str}\"\n", " ])\n", " !pip install pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n", " else:\n", diff --git a/docs/tutorials/camera_position_optimization_with_differentiable_rendering.ipynb b/docs/tutorials/camera_position_optimization_with_differentiable_rendering.ipynb index 6cd75e45d..7e0d34ef2 100644 --- a/docs/tutorials/camera_position_optimization_with_differentiable_rendering.ipynb +++ b/docs/tutorials/camera_position_optimization_with_differentiable_rendering.ipynb @@ -78,10 +78,11 @@ "if need_pytorch3d:\n", " if torch.__version__.startswith(\"1.10.\") and sys.platform.startswith(\"linux\"):\n", " # We try to install PyTorch3D via a released wheel.\n", + " pyt_version_str=torch.__version__.split(\"+\")[0].replace(\".\", \"\")\n", " version_str=\"\".join([\n", " f\"py3{sys.version_info.minor}_cu\",\n", " torch.version.cuda.replace(\".\",\"\"),\n", - " f\"_pyt{torch.__version__[0:5:2]}\"\n", + " f\"_pyt{pyt_version_str}\"\n", " ])\n", " !pip install pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n", " else:\n", diff --git a/docs/tutorials/dataloaders_ShapeNetCore_R2N2.ipynb b/docs/tutorials/dataloaders_ShapeNetCore_R2N2.ipynb index 3494888e3..84b65f298 100644 --- a/docs/tutorials/dataloaders_ShapeNetCore_R2N2.ipynb +++ b/docs/tutorials/dataloaders_ShapeNetCore_R2N2.ipynb @@ -53,10 +53,11 @@ "if need_pytorch3d:\n", " if torch.__version__.startswith(\"1.10.\") and sys.platform.startswith(\"linux\"):\n", " # We try to install PyTorch3D via a released wheel.\n", + " pyt_version_str=torch.__version__.split(\"+\")[0].replace(\".\", \"\")\n", " version_str=\"\".join([\n", " f\"py3{sys.version_info.minor}_cu\",\n", " torch.version.cuda.replace(\".\",\"\"),\n", - " f\"_pyt{torch.__version__[0:5:2]}\"\n", + " f\"_pyt{pyt_version_str}\"\n", " ])\n", " !pip install pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n", " else:\n", diff --git a/docs/tutorials/deform_source_mesh_to_target_mesh.ipynb b/docs/tutorials/deform_source_mesh_to_target_mesh.ipynb index 2b66690c0..ac074ba60 100644 --- a/docs/tutorials/deform_source_mesh_to_target_mesh.ipynb +++ b/docs/tutorials/deform_source_mesh_to_target_mesh.ipynb @@ -92,10 +92,11 @@ "if need_pytorch3d:\n", " if torch.__version__.startswith(\"1.10.\") and sys.platform.startswith(\"linux\"):\n", " # We try to install PyTorch3D via a released wheel.\n", + " pyt_version_str=torch.__version__.split(\"+\")[0].replace(\".\", \"\")\n", " version_str=\"\".join([\n", " f\"py3{sys.version_info.minor}_cu\",\n", " torch.version.cuda.replace(\".\",\"\"),\n", - " f\"_pyt{torch.__version__[0:5:2]}\"\n", + " f\"_pyt{pyt_version_str}\"\n", " ])\n", " !pip install pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n", " else:\n", diff --git a/docs/tutorials/fit_simple_neural_radiance_field.ipynb b/docs/tutorials/fit_simple_neural_radiance_field.ipynb index 4f58617ee..151406f9a 100644 --- a/docs/tutorials/fit_simple_neural_radiance_field.ipynb +++ b/docs/tutorials/fit_simple_neural_radiance_field.ipynb @@ -58,10 +58,11 @@ "if need_pytorch3d:\n", " if torch.__version__.startswith(\"1.10.\") and sys.platform.startswith(\"linux\"):\n", " # We try to install PyTorch3D via a released wheel.\n", + " pyt_version_str=torch.__version__.split(\"+\")[0].replace(\".\", \"\")\n", " version_str=\"\".join([\n", " f\"py3{sys.version_info.minor}_cu\",\n", " torch.version.cuda.replace(\".\",\"\"),\n", - " f\"_pyt{torch.__version__[0:5:2]}\"\n", + " f\"_pyt{pyt_version_str}\"\n", " ])\n", " !pip install pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n", " else:\n", diff --git a/docs/tutorials/fit_textured_mesh.ipynb b/docs/tutorials/fit_textured_mesh.ipynb index 0be4d7da5..0839a5c4b 100644 --- a/docs/tutorials/fit_textured_mesh.ipynb +++ b/docs/tutorials/fit_textured_mesh.ipynb @@ -70,10 +70,11 @@ "if need_pytorch3d:\n", " if torch.__version__.startswith(\"1.10.\") and sys.platform.startswith(\"linux\"):\n", " # We try to install PyTorch3D via a released wheel.\n", + " pyt_version_str=torch.__version__.split(\"+\")[0].replace(\".\", \"\")\n", " version_str=\"\".join([\n", " f\"py3{sys.version_info.minor}_cu\",\n", " torch.version.cuda.replace(\".\",\"\"),\n", - " f\"_pyt{torch.__version__[0:5:2]}\"\n", + " f\"_pyt{pyt_version_str}\"\n", " ])\n", " !pip install pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n", " else:\n", diff --git a/docs/tutorials/fit_textured_volume.ipynb b/docs/tutorials/fit_textured_volume.ipynb index d3a3a75a9..e05340af3 100644 --- a/docs/tutorials/fit_textured_volume.ipynb +++ b/docs/tutorials/fit_textured_volume.ipynb @@ -49,10 +49,11 @@ "if need_pytorch3d:\n", " if torch.__version__.startswith(\"1.10.\") and sys.platform.startswith(\"linux\"):\n", " # We try to install PyTorch3D via a released wheel.\n", + " pyt_version_str=torch.__version__.split(\"+\")[0].replace(\".\", \"\")\n", " version_str=\"\".join([\n", " f\"py3{sys.version_info.minor}_cu\",\n", " torch.version.cuda.replace(\".\",\"\"),\n", - " f\"_pyt{torch.__version__[0:5:2]}\"\n", + " f\"_pyt{pyt_version_str}\"\n", " ])\n", " !pip install pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n", " else:\n", diff --git a/docs/tutorials/render_colored_points.ipynb b/docs/tutorials/render_colored_points.ipynb index 43607289b..b25775e5a 100644 --- a/docs/tutorials/render_colored_points.ipynb +++ b/docs/tutorials/render_colored_points.ipynb @@ -52,10 +52,11 @@ "if need_pytorch3d:\n", " if torch.__version__.startswith(\"1.10.\") and sys.platform.startswith(\"linux\"):\n", " # We try to install PyTorch3D via a released wheel.\n", + " pyt_version_str=torch.__version__.split(\"+\")[0].replace(\".\", \"\")\n", " version_str=\"\".join([\n", " f\"py3{sys.version_info.minor}_cu\",\n", " torch.version.cuda.replace(\".\",\"\"),\n", - " f\"_pyt{torch.__version__[0:5:2]}\"\n", + " f\"_pyt{pyt_version_str}\"\n", " ])\n", " !pip install pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n", " else:\n", diff --git a/docs/tutorials/render_densepose.ipynb b/docs/tutorials/render_densepose.ipynb index 6f166ee0b..f23b2d3bc 100644 --- a/docs/tutorials/render_densepose.ipynb +++ b/docs/tutorials/render_densepose.ipynb @@ -59,10 +59,11 @@ "if need_pytorch3d:\n", " if torch.__version__.startswith(\"1.10.\") and sys.platform.startswith(\"linux\"):\n", " # We try to install PyTorch3D via a released wheel.\n", + " pyt_version_str=torch.__version__.split(\"+\")[0].replace(\".\", \"\")\n", " version_str=\"\".join([\n", " f\"py3{sys.version_info.minor}_cu\",\n", " torch.version.cuda.replace(\".\",\"\"),\n", - " f\"_pyt{torch.__version__[0:5:2]}\"\n", + " f\"_pyt{pyt_version_str}\"\n", " ])\n", " !pip install pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n", " else:\n", diff --git a/docs/tutorials/render_textured_meshes.ipynb b/docs/tutorials/render_textured_meshes.ipynb index a33e27155..faf2e2172 100644 --- a/docs/tutorials/render_textured_meshes.ipynb +++ b/docs/tutorials/render_textured_meshes.ipynb @@ -75,10 +75,11 @@ "if need_pytorch3d:\n", " if torch.__version__.startswith(\"1.10.\") and sys.platform.startswith(\"linux\"):\n", " # We try to install PyTorch3D via a released wheel.\n", + " pyt_version_str=torch.__version__.split(\"+\")[0].replace(\".\", \"\")\n", " version_str=\"\".join([\n", " f\"py3{sys.version_info.minor}_cu\",\n", " torch.version.cuda.replace(\".\",\"\"),\n", - " f\"_pyt{torch.__version__[0:5:2]}\"\n", + " f\"_pyt{pyt_version_str}\"\n", " ])\n", " !pip install pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html\n", " else:\n", diff --git a/packaging/linux_wheels/README.md b/packaging/linux_wheels/README.md index da61400a9..a057e0bf7 100644 --- a/packaging/linux_wheels/README.md +++ b/packaging/linux_wheels/README.md @@ -20,10 +20,11 @@ commands. ``` import sys import torch +pyt_version_str=torch.__version__.split("+")[0].replace(".", "") version_str="".join([ f"py3{sys.version_info.minor}_cu", torch.version.cuda.replace(".",""), - f"_pyt{torch.__version__[0:5:2]}" + f"_pyt{pyt_version_str}" ]) !pip install pytorch3d -f https://dl.fbaipublicfiles.com/pytorch3d/packaging/wheels/{version_str}/download.html ```