Troubleshooting Installation Issues with BIDScoin: Missing Modules jpeg_ls and rle

Hello NeuroStars Community,

I’m currently trying to set up BIDScoin on a Windows system and have encountered persistent issues related to missing Python modules. Despite following the standard installation guidelines and attempting various troubleshooting steps, I can’t seem to resolve errors related to the jpeg_ls and rle modules.

Environment:

  • Operating System: Windows 10 (I’m working on Windows 11 but I’ve used VS installer to update this)
  • Python Version: 3.12
  • I am working within a virtual environment specifically set up for BIDScoin.

Issues Encountered:

  1. Repeated error messages stating ModuleNotFoundError for jpeg_ls and rle when trying to run bidscoiner.
  2. Attempts to install these modules via pip have been unsuccessful, with messages indicating that these packages are not available in the repository.

Steps Taken:

  • I have tried using PowerShell, Gitbash, VS code
  • I have tried Visual Studio Installer Adjustments**:
    • Utilized the Visual Studio Installer to ensure that the Python development environment and relevant workloads were correctly configured.
  • I have tried installing related packages like glymur which is supposed to handle JPEG2000 images but this has not resolved the jpeg_ls issue.

I’m wondering if anyone else has faced similar issues or if there’s a known workaround or specific steps I should follow to get these modules recognized and working. Any guidance or suggestions would be greatly appreciated!

Thank you and see code below:

## BIDScoiner Error: Missing Modules
```bash
(bidscoiner) PS C:\Users\felsi> bidscoiner
2024-09-14 21:42:20,922 [   ERROR] No module named 'jpeg_ls'
Traceback (most recent call last):
  File "C:\Users\felsi\Downloads\Dropbox\pipeline\bidscoiner\Lib\site-packages\pydicom\pixels\utils.py", line 1274, in _passes_version_check
    module = importlib.import_module(package_name, "__version__")
  File "C:\Users\felsi\AppData\Local\Programs\Python\Python312\Lib\importlib\__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1324, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'jpeg_ls'
2024-09-14 21:42:20,922 [   ERROR] No module named 'rle'
Traceback (most recent call last):
  File "C:\Users\felsi\Downloads\Dropbox\pipeline\bidscoiner\Lib\site-packages\pydicom\pixels\utils.py", line 1274, in _passes_version_check
    module = importlib.import_module(package_name, "__version__")
  File "C:\Users\felsi\AppData\Local\Programs\Python\Python312\Lib\importlib\__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1324, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'rle'

Attempt to Install CharPyLS

(bidscoiner) PS C:\Users\felsi\Downloads\Dropbox\pipeline> pip install CharPyLS
ERROR: Could not find a version that satisfies the requirement CharPyLS (from versions: none)
ERROR: No matching distribution found for CharPyLS

Glymur Upgrade Check

(bidscoiner) PS C:\Users\felsi\Downloads\Dropbox\pipeline> pip install glymur --upgrade
Requirement already satisfied: glymur in c:\users\felsi\downloads\dropbox\pipeline\bidscoiner\lib\site-packages (0.13.6)
Requirement already satisfied: numpy in c:\users\felsi\downloads\dropbox\pipeline\bidscoiner\lib\site-packages (from glymur) (2.1.1)
Requirement already satisfied: lxml in c:\users\felsi\downloads\dropbox\pipeline\bidscoiner\lib\site-packages (from glymur) (5.3.0)
Requirement already satisfied: packaging in c:\users\felsi\downloads\dropbox\pipeline\bidscoiner\lib\site-packages (from glymur) (24.1)

Failed pip search for jpeg_ls

(bidscoiner) PS C:\Users\felsi\Downloads\Dropbox\pipeline> pip search jpeg_ls
ERROR: XMLRPC request failed [code: -32500]
RuntimeError: PyPI no longer supports 'pip search' (or XML-RPC search). Please use https://pypi.org/search (via a browser) instead

Hi,

I’ve never seen this error before and I cannot reproduce your error. I just did:

PS C:\Users\marzwi> python -V
Python 3.12.4
PS C:\Users\marzwi> python -m venv test
PS C:\Users\marzwi> .\test\Scripts\activate
(test) PS C:\Users\marzwi> pip install bidscoin
Collecting bidscoin
  Downloading bidscoin-4.3.3-py3-none-any.whl.metadata (47 kB)
     ---------------------------------------- 47.8/47.8 kB 341.2 kB/s eta 0:00:00
[..]
Successfully installed PyQt6-6.7.1 PyQt6-Qt6-6.7.2 PyQt6-sip-13.8.0 attrs-24.2.0 bids-validator-1.14.7.post0 bidscoin-4.3.3 bidsschematools-0.11.3 certifi-2024.8.30 charset-normalizer-3.3.2 citeproc-py-0.6.0 click-8.1.7 colorama-0.4.6 coloredlogs-15.0.1 contourpy-1.3.0 cycler-0.12.1 drmaa-0.7.9 duecredit-0.10.2 fonttools-4.53.1 humanfriendly-10.0 idna-3.10 jsonschema-4.23.0 jsonschema-specifications-2023.12.1 kiwisolver-1.4.7 looseversion-1.3.0 lxml-5.3.0 matplotlib-3.9.2 multiecho-0.29 nibabel-5.2.1 numpy-2.1.1 packaging-24.1 pandas-2.2.2 pillow-10.4.0 pydicom-3.0.0 pyparsing-3.1.4 pyreadline3-3.5.2 python-dateutil-2.9.0.post0 pytz-2024.2 pyyaml-6.0.2 referencing-0.35.1 requests-2.32.3 rpds-py-0.20.0 ruamel-yaml-0.18.6 ruamel.yaml.clib-0.2.8 six-1.16.0 tqdm-4.66.5 tzdata-2024.1 urllib3-2.2.3

Did you install python using the official python installer?

Your error is a dependency of a dependency error, so it’s a bit out of my control. One one or two occasions in the past, I had a similar strange dependency of a dependency error, which resolved itself after one or two days