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

Error when trying to install on pip #78

Open
TomerGamerTV opened this issue Mar 16, 2022 · 10 comments
Open

Error when trying to install on pip #78

TomerGamerTV opened this issue Mar 16, 2022 · 10 comments

Comments

@TomerGamerTV
Copy link

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.
@jowodo
Copy link

jowodo commented Mar 17, 2022

I get the same error with python3.10

@dopelDev
Copy link

same probleme here
Python 3.9.2
2.7.18

@tovicheung
Copy link

same error here with python 3.8.10

@daudix
Copy link

daudix commented Mar 29, 2022

Same, Fedora 35, latest pip & python

@e5u
Copy link

e5u commented Apr 2, 2022

same error here with Windows11 ,latest python & pip

@VoidAny
Copy link

VoidAny commented Apr 2, 2022

Happens on video-to-ascii >= 1.2.9

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

@ygidtu
Copy link

ygidtu commented Apr 26, 2022

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

@nevertoday
Copy link

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

works fine for me

@hueychen27
Copy link

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
Copy link

Be sure to install opencv-python and xtermcolor

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

11 participants