bowang-lab / MedSAMSlicer

3D Slicer Plugin for Segment anything in medical images
https://www.nature.com/articles/s41467-024-44824-z
173 stars 20 forks source link

Errors: installing dependencies: Medsam Lite Server #4

Closed huangkai23 closed 9 months ago

huangkai23 commented 10 months ago

Hi, I have checked that the network can download files from Github, but I am still stuck in the process of installing dependencies:Medsam Lite Server. The error messages are indicated below. ERROR: Invalid requirement: '5.6.1/MedSAMSlicer-0.01/med/server_essentials' Exception in thread Thread-12: Traceback (most recent call last): File "G:\software\Slicer 5.6.1\lib\Python\Lib\threading.py", line 973, in _bootstrap_inner self.run() File "G:\software\Slicer 5.6.1\lib\Python\Lib\threading.py", line 910, in run self._target(*self._args, **self._kwargs) File "G:/software/Slicer 5.6.1/MedSAMSlicer-0.01/MedSAMSlicer-0.01/MedSAM/MedSAMLite/MedSAMLite.py", line 429, in pip_install_wrapper slicer.util.pip_install(command) File "G:\software\Slicer 5.6.1\bin\Python\slicer\util.py", line 3887, in pip_install _executePythonModule("pip", args) File "G:\software\Slicer 5.6.1\bin\Python\slicer\util.py", line 3848, in _executePythonModule logProcessOutput(proc) File "G:\software\Slicer 5.6.1\bin\Python\slicer\util.py", line 3814, in logProcessOutput raise CalledProcessError(retcode, proc.args, output=proc.stdout, stderr=proc.stderr) subprocess.CalledProcessError: Command '['G:/software/Slicer 5.6.1/bin/../bin\PythonSlicer.EXE', '-m', 'pip', 'install', '-e', 'G:/software/Slicer',

rasakereh commented 9 months ago

Hi, thank you for sharing your experience! I guess the reason is existence of a space character (" ") in the directory name. We will fix it asap and keep you posted. A temporary fix would be saving everything in folders and files with no space in the name.

rasakereh commented 9 months ago

A new release is ready. We tried to address this issue. Please remove pre-existing version and install the new one and let me know if it fixed your issue.

huangkai23 commented 9 months ago

Hi, thank you for your reply! I install the new version, but I meet another problem while I am stuck in the process of installing dependencies:Medsam Lite Server. Thanks! Obtaining file:///G:/software/Slicer%205.7.0-2024-01-20/med/server_essentials Preparing metadata (setup.py): started Preparing metadata (setup.py): finished with status 'done' WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1129)'))': /simple/monai/ WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1129)'))': /simple/monai/ WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1129)'))': /simple/monai/ WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1129)'))': /simple/monai/ WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1129)'))': /simple/monai/ Could not fetch URL https://pypi.org/simple/monai/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/monai/ (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1129)'))) - skipping INFO: pip is looking at multiple versions of medsam to determine which version is compatible with other requirements. This could take a while. ERROR: Could not find a version that satisfies the requirement monai (from medsam) (from versions: none) ERROR: No matching distribution found for monai Exception in thread Thread-6: Traceback (most recent call last): File "G:\software\Slicer 5.7.0-2024-01-20\lib\Python\Lib\threading.py", line 973, in _bootstrap_inner self.run() File "G:\software\Slicer 5.7.0-2024-01-20\lib\Python\Lib\threading.py", line 910, in run self._target(*self._args, **self._kwargs) File "G:/software/Slicer 5.7.0-2024-01-20/MedSAMSlicer-0.02/MedSAMSlicer-0.02/MedSAM/MedSAMLite/MedSAMLite.py", line 454, in pip_install_wrapper slicer.util.pip_install(command) File "G:\software\Slicer 5.7.0-2024-01-20\bin\Python\slicer\util.py", line 3887, in pip_install _executePythonModule("pip", args) File "G:\software\Slicer 5.7.0-2024-01-20\bin\Python\slicer\util.py", line 3848, in _executePythonModule logProcessOutput(proc) File "G:\software\Slicer 5.7.0-2024-01-20\bin\Python\slicer\util.py", line 3814, in logProcessOutput raise CalledProcessError(retcode, proc.args, output=proc.stdout, stderr=proc.stderr) subprocess.CalledProcessError: Command '['G:/software/Slicer 5.7.0-2024-01-20/bin/../bin\PythonSlicer.EXE', '-m', 'pip', 'install', '-e', 'G:/software/Slicer 5.7.0-2024-01-20/med/server_essentials']' returned non-zero exit status 1.

rasakereh commented 9 months ago

The error says that it cannot install monai dependency. As it is the first package in our dependency list, it is possible that you had a network issue during this. Would you retry the process please? If it did not work please follow these steps:

  1. From Slicer's toolbar click on the Show Python Console icon (the rightmost icon): image
  2. A text box appears at the bottom of the software.
  3. Type this code and press Enter: pip_install('monai')

Let me know how the output looked like please. Thanks!

huangkai23 commented 9 months ago

Hi, I successfully installed all dependencies after I fixed the network issue.

Thanks!