tg-archive icon indicating copy to clipboard operation
tg-archive copied to clipboard

Error ModuleNotFoundError: No module named 'yaml' during installation

Open boochamoocha opened this issue 1 year ago • 9 comments

On mac os I get an error ModuleNotFoundError: No module named 'yaml' during installation using pip3 install tg-archive

I've tried Python 3.8.6, 3.9.6, 3.11.5, tried devbox, tried system level venv - same result

I've tried to install pyyaml - no result

Full installation log

Collecting tg-archive
  Using cached tg-archive-1.1.3.tar.gz (28 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [19 lines of output]
      Traceback (most recent call last):
        File "/Users/user1/Dev/python/tg/backup/.venv/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/Users/user1/Dev/python/tg/backup/.venv/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/Users/user1/Dev/python/tg/backup/.venv/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
        File "/private/var/folders/p0/7_qj4j611dlcdp7ztwrqnfjw0000gn/T/pip-build-env-26_6nabk/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
        File "/private/var/folders/p0/7_qj4j611dlcdp7ztwrqnfjw0000gn/T/pip-build-env-26_6nabk/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
          self.run_setup()
        File "/private/var/folders/p0/7_qj4j611dlcdp7ztwrqnfjw0000gn/T/pip-build-env-26_6nabk/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 480, in run_setup
          super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
        File "/private/var/folders/p0/7_qj4j611dlcdp7ztwrqnfjw0000gn/T/pip-build-env-26_6nabk/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 5, in <module>
        File "/private/var/folders/p0/7_qj4j611dlcdp7ztwrqnfjw0000gn/T/pip-install-j19exdez/tg-archive_e75c8145703a4eb39650f52194eb17b8/tgarchive/__init__.py", line 6, in <module>
          import yaml
      ModuleNotFoundError: No module named 'yaml'
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

boochamoocha avatar Jan 22 '24 10:01 boochamoocha

I have the same issue on Windows 11. "ModuleNotFoundError: No module named 'yaml'" followed by "Requirement already satisfied: pyyaml"

sphynxnymph avatar Jan 30 '24 03:01 sphynxnymph

same issue as described by OP macOS Sonoma 14.1.2

mr-technofreak avatar Mar 01 '24 22:03 mr-technofreak

same issue 🙃 Python 3.11 venv with Poetry macOS Sonoma 14.4.1

simicvm avatar Apr 19 '24 19:04 simicvm

The library is in need of some library config modernization. You can get it running by manually installing everything in the requirements.txt first and then installing via pip normally. So:

pip install 'telethon==1.29.3' 'jinja2>=2.11.3' 'PyYAML>=5.4.1' 'cryptg==0.2.post2' 'Pillow>=8.3.2' 'feedgen>=0.9.0' 'python-magic>=0.4.24' 'pytz>=2020.5' tg-archive

brandonrobertz avatar Jun 20 '24 22:06 brandonrobertz

no change in error even when dependencies are manually installed. error occurs even if trying to install tg-archive --no-deps

mr-technofreak avatar Jul 05 '24 17:07 mr-technofreak

same problem all the modules installed manually no yaml file is an error

zv09 avatar Jul 25 '24 04:07 zv09

success, tg-archive is installed using macos mojave remove all the pip3 and python3 versions got installed last build python3.12 rebuild all dependencies in requirements tg-archive is installed finally without errors

by the way i ruined pip3 in os, and need to recover it i was used macports, so before doing that, pls check guides in internet for how to properly update python version and remove inactive versions

zv09 avatar Jul 27 '24 02:07 zv09