# Openslide-python not working when trying to use monailabel

**URL:** <https://discourse.slicer.org/t/openslide-python-not-working-when-trying-to-use-monailabel/33427>\
**Category:** Support\
**Tags:** python, monailabel\
**Created:** [December 17, 2023, 11:40pm UTC](https://discourse.slicer.org/t/openslide-python-not-working-when-trying-to-use-monailabel/33427 "2023-12-17T23:40:24Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vineet\_Saravanan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/vineet_saravanan/32/67136_2.png) [@Vineet\_Saravanan](https://discourse.slicer.org/u/Vineet_Saravanan)\
**Post date:** [December 17, 2023, 11:40pm UTC](https://discourse.slicer.org/t/openslide-python-not-working-when-trying-to-use-monailabel/33427/1 "2023-12-17T23:40:24Z")

</div>

When I try to install monailabel with the command ‘pip install -U monailabel’, I get this issue:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/a/3/a3673608ee0e4e647c51318f7927bd6d42506531.png)  
I pip installed openslide-python before, but I am still having an issue. I also tried installing it with a GitHub clone, but that didn’t work. How should I solve this issue?

---

<div class="post-metadata">

**Author:** ![jamesobutler](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jamesobutler/32/7511_2.png) [@jamesobutler](https://discourse.slicer.org/u/jamesobutler)\
**Post date:** [December 18, 2023, 1:34am UTC](https://discourse.slicer.org/t/openslide-python-not-working-when-trying-to-use-monailabel/33427/2 "2023-12-18T01:34:05Z")

</div>

Since the `monai` package of `monailabel` requires `openslide-python` 1.1.2 as stated [here](https://github.com/Project-MONAI/MONAI/blob/865972f7a791bf7b42efbcd87c8402bd865b329e/setup.cfg#L63), then I would suggest using Python 3.10 or earlier as there are only Whl files available for those versions. See [openslide-python · PyPI](https://pypi.org/project/openslide-python/1.1.2/#files). Python 3.11 was not released when this openslide version was released so it is not officially supported.

---

<div class="post-metadata">

**Author:** ![Vineet\_Saravanan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/vineet_saravanan/32/67136_2.png) [@Vineet\_Saravanan](https://discourse.slicer.org/u/Vineet_Saravanan)\
**Post date:** [December 18, 2023, 5:10pm UTC](https://discourse.slicer.org/t/openslide-python-not-working-when-trying-to-use-monailabel/33427/3 "2023-12-18T17:10:16Z")

</div>

Hello, I tried using 3.9.13 but still have the same issue.

---

<div class="post-metadata">

**Author:** ![diazandr3s](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/diazandr3s/32/9973_2.png) [@diazandr3s](https://discourse.slicer.org/u/diazandr3s)\
**Post date:** [December 20, 2023, 6:46pm UTC](https://discourse.slicer.org/t/openslide-python-not-working-when-trying-to-use-monailabel/33427/4 "2023-12-20T18:46:55Z")

</div>

This is strange. There shouldn’t be an issue with Python 3.9. Can you please share the error?

Also, I’d suggest trying a fresh Python environment using version 3.9 or 3.10. More comments about this issue are also here: [monailabel cannot be installed in python 3.11 · Issue #1569 · Project-MONAI/MONAILabel · GitHub](https://github.com/Project-MONAI/MONAILabel/issues/1569#issuecomment-1864967422)

Hope this helps,

---

<div class="post-metadata">

**Author:** ![Vineet\_Saravanan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/vineet_saravanan/32/67136_2.png) [@Vineet\_Saravanan](https://discourse.slicer.org/u/Vineet_Saravanan)\
**Post date:** [December 20, 2023, 11:25pm UTC](https://discourse.slicer.org/t/openslide-python-not-working-when-trying-to-use-monailabel/33427/5 "2023-12-20T23:25:10Z")

</div>

Hello. I tried again by uninstalling python and reinstalling an earlier version and it worked. Thank you for the help!

---

<div class="post-metadata">

**Author:** ![diazandr3s](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/diazandr3s/32/9973_2.png) [@diazandr3s](https://discourse.slicer.org/u/diazandr3s)\
**Post date:** [January 1, 2024, 9:18pm UTC](https://discourse.slicer.org/t/openslide-python-not-working-when-trying-to-use-monailabel/33427/6 "2024-01-01T21:18:46Z")

</div>

Thanks for the update, @Vineet_Saravanan

---

<div class="post-metadata">

**Author:** ![howtoostart](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/howtoostart/32/77678_2.png) [@howtoostart](https://discourse.slicer.org/u/howtoostart)\
**Post date:** [August 20, 2024, 3:42am UTC](https://discourse.slicer.org/t/openslide-python-not-working-when-trying-to-use-monailabel/33427/7 "2024-08-20T03:42:31Z")

</div>

hello.What was the final successful version of Python?
