video-to-ascii icon indicating copy to clipboard operation
video-to-ascii copied to clipboard

Error when trying to install on pip

Open TomerGamerTV opened this issue 2 years ago • 10 comments

Im getting this error after trying to install it on kali linux wsl2 or windows normally.


Defaulting to user installation because normal site-packages is not writeable
Collecting video-to-ascii
  Downloading video_to_ascii-1.3.0.tar.gz (6.9 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [15 lines of output]
      Traceback (most recent call last):
        File "/tmp/pip-install-k19bynbv/video-to-ascii_168962df3c8d49358f05e874508b0ea7/setup.py", line 11, in install_package
          main.main(['install', package])
      AttributeError: 'function' object has no attribute 'main'

      During handling of the above exception, another exception occurred:

      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-k19bynbv/video-to-ascii_168962df3c8d49358f05e874508b0ea7/setup.py", line 21, in <module>
          install_package('opencv-python')
        File "/tmp/pip-install-k19bynbv/video-to-ascii_168962df3c8d49358f05e874508b0ea7/setup.py", line 14, in install_package
          __main__._main(['install', package])
      AttributeError: module 'pip.__main__' has no attribute '_main'
      [end of output]

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

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

TomerGamerTV avatar Mar 16 '22 21:03 TomerGamerTV

I get the same error with python3.10

jowodo avatar Mar 17 '22 09:03 jowodo

same probleme here Python 3.9.2 2.7.18

dopelDev avatar Mar 25 '22 22:03 dopelDev

same error here with python 3.8.10

tovicheung avatar Mar 29 '22 02:03 tovicheung

same error here with all the python versions

awaited101 avatar Mar 29 '22 07:03 awaited101

Same, Fedora 35, latest pip & python

daudix avatar Mar 29 '22 11:03 daudix

same error here with Windows11 ,latest python & pip

e5u avatar Apr 02 '22 01:04 e5u

Happens on video-to-ascii >= 1.2.9

pip installing "video-to-ascii == 1.2.8" worked for me

VoidAny avatar Apr 02 '22 17:04 VoidAny

I solve this by editing the setup.py,

I download the source code of version 1.2.9 and edit the install_package

Original:

def install_package(package):
    import pip
    try:
        from pip._internal import main
        main.main(['install', package])
    except AttributeError:
        from pip import __main__
        __main__._main(['install', package])

Modified:

def install_package(package):
    import pip
    try:
        from pip._internal import main
        main(['install', package])   # main.main to main
    except AttributeError:
        from pip import __main__
        __main__._main(['install', package])

Then: python setup.py install

ygidtu avatar Apr 26 '22 02:04 ygidtu

pip3 install -U video-to-ascii==1.2.8

works fine for me

nevertoday avatar Aug 26 '22 04:08 nevertoday

pip3 install -U video-to-ascii==1.2.8

works fine for me

I get ModuleNotFoundError: No module named 'cv2' when I run video-to-ascii

hueychen27 avatar Jan 07 '24 05:01 hueychen27

Be sure to install opencv-python and xtermcolor

hueychen27 avatar Jan 07 '24 05:01 hueychen27