Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError: No module named 'boltons' error #8

Open
jvcasillas opened this issue Apr 19, 2024 · 1 comment
Open

ModuleNotFoundError: No module named 'boltons' error #8

jvcasillas opened this issue Apr 19, 2024 · 1 comment

Comments

@jvcasillas
Copy link

I am trying to run Dr. VOT on some data I have, but I cannot seem to get the program to run with the preinstalled wav files. The heap of words below is what I see in terminal. I think the boltons problem is the most obvious (to me, at least). Specifically, where is says ModuleNotFoundError: No module named 'boltons'. I have tried installing this module separately, but no luck. When I run /check_installations.sh it says "All good :)". Any help would be greatly appreciated.

Im running python 3.11 on Mac OS 14.1.

(base) casillas@nbp-25-202-170 Dr.VOT % ./run_script.sh                  
mkdir: ./data/: File exists
mkdir: command: File exists
mkdir: ./data/raw: File exists
============
Step 0: Installing dependencies in a virtual environment(It doesn't change your settings)
============
Pipfile.lock not found, creating...
Locking [packages] dependencies...
Building requirements...
Resolving dependencies...
False
CRITICAL:pipenv.patched.pip._internal.resolution.resolvelib.factory:Could not find a version that satisfies the requirement torch==2.0.1 (from versions: 2.2.0, 2.2.1, 2.2.2)
[ResolutionFailure]:   File "/opt/homebrew/Cellar/pipenv/2023.12.1/libexec/lib/python3.12/site-packages/pipenv/resolver.py", line 645, in _main
[ResolutionFailure]:       resolve_packages(
[ResolutionFailure]:   File "/opt/homebrew/Cellar/pipenv/2023.12.1/libexec/lib/python3.12/site-packages/pipenv/resolver.py", line 612, in resolve_packages
[ResolutionFailure]:       results, resolver = resolve(
[ResolutionFailure]:       ^^^^^^^^
[ResolutionFailure]:   File "/opt/homebrew/Cellar/pipenv/2023.12.1/libexec/lib/python3.12/site-packages/pipenv/resolver.py", line 592, in resolve
[ResolutionFailure]:       return resolve_deps(
[ResolutionFailure]:       ^^^^^^^^^^^^^
[ResolutionFailure]:   File "/opt/homebrew/Cellar/pipenv/2023.12.1/libexec/lib/python3.12/site-packages/pipenv/utils/resolver.py", line 918, in resolve_deps
[ResolutionFailure]:       results, hashes, internal_resolver = actually_resolve_deps(
[ResolutionFailure]:       ^^^^^^^^^^^^^^^^^^^^^^
[ResolutionFailure]:   File "/opt/homebrew/Cellar/pipenv/2023.12.1/libexec/lib/python3.12/site-packages/pipenv/utils/resolver.py", line 691, in actually_resolve_deps
[ResolutionFailure]:       resolver.resolve()
[ResolutionFailure]:   File "/opt/homebrew/Cellar/pipenv/2023.12.1/libexec/lib/python3.12/site-packages/pipenv/utils/resolver.py", line 448, in resolve
[ResolutionFailure]:       raise ResolutionFailure(message=str(e))
[pipenv.exceptions.ResolutionFailure]: Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies.
  You can use $ pipenv run pip install <requirement_name> to bypass this mechanism, then run $ pipenv graph to inspect the versions actually installed in the virtualenv.
  Hint: try $ pipenv lock --pre if it is a pre-release dependency.
ERROR: No matching distribution found for torch==2.0.1

✘ Locking Failed!
Traceback (most recent call last):
  File "/opt/homebrew/bin/pipenv", line 8, in <module>
    sys.exit(cli())
             ^^^^^
  File "/opt/homebrew/Cellar/pipenv/2023.12.1/libexec/lib/python3.12/site-packages/pipenv/vendor/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/pipenv/2023.12.1/libexec/lib/python3.12/site-packages/pipenv/cli/options.py", line 58, in main
    return super().main(*args, **kwargs, windows_expand_args=False)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/pipenv/2023.12.1/libexec/lib/python3.12/site-packages/pipenv/vendor/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/pipenv/2023.12.1/libexec/lib/python3.12/site-packages/pipenv/vendor/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/pipenv/2023.12.1/libexec/lib/python3.12/site-packages/pipenv/vendor/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/pipenv/2023.12.1/libexec/lib/python3.12/site-packages/pipenv/vendor/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/pipenv/2023.12.1/libexec/lib/python3.12/site-packages/pipenv/vendor/click/decorators.py", line 92, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/pipenv/2023.12.1/libexec/lib/python3.12/site-packages/pipenv/vendor/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/pipenv/2023.12.1/libexec/lib/python3.12/site-packages/pipenv/cli/command.py", line 209, in install
    do_install(
  File "/opt/homebrew/Cellar/pipenv/2023.12.1/libexec/lib/python3.12/site-packages/pipenv/routines/install.py", line 164, in do_install
    do_init(
  File "/opt/homebrew/Cellar/pipenv/2023.12.1/libexec/lib/python3.12/site-packages/pipenv/routines/install.py", line 672, in do_init
    do_lock(
  File "/opt/homebrew/Cellar/pipenv/2023.12.1/libexec/lib/python3.12/site-packages/pipenv/routines/lock.py", line 65, in do_lock
    venv_resolve_deps(
  File "/opt/homebrew/Cellar/pipenv/2023.12.1/libexec/lib/python3.12/site-packages/pipenv/utils/resolver.py", line 859, in venv_resolve_deps
    c = resolve(cmd, st, project=project)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/pipenv/2023.12.1/libexec/lib/python3.12/site-packages/pipenv/utils/resolver.py", line 728, in resolve
    raise RuntimeError("Failed to lock Pipfile.lock!")
RuntimeError: Failed to lock Pipfile.lock!
============
Step 1: Preparing the data
============
Traceback (most recent call last):
  File "/Users/casillas/Desktop/Dr.VOT/./process_data/prepare_wav_dir.py", line 1, in <module>
    from boltons import fileutils
ModuleNotFoundError: No module named 'boltons'
Failed to collect the data, check log.txt
cleanup
@kirbyj
Copy link

kirbyj commented Nov 29, 2024

Hi Joseph,

since Dr.VOT now sadly seems to be abandonware I can only tell you what eventually worked for me...

The issue has nothing to do with boltons (which you can discover for yourself by running pipenv install --verbose). The problem is actually with PyTorch; they way they make versions available for download isn't compatible with pipenv for some reason. So you need to specify the PyTorch version which is actually appropriate for your architecture in the Pipfile.

Replace the line

torch = "==2.0.1"

with something like

torch = {file = "https://download.pytorch.org/whl/cpu/torch-2.0.1-cp39-none-macosx_11_0_arm64.whl"}

You can find the version you need at https://download.pytorch.org/whl/torch/. You'll have to match it for your system and architecture.

Another thing is it looks like you are using Python 3.12. PyTorch is extremely version-sensitive; either set the local Python version to be 3.9 (using pyenv or similar) or I think if you uncomment the python_version line in the Pipfile, it will install a local version of 3.9 to use. (That's what the "-cp39-" part of the wheel URL above refers to.)

Maybe this would all work with other versions of Python/PyTorch... I dunno. Dependency hell is real.

Anyways, hope this helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants