video-to-ascii
video-to-ascii copied to clipboard
Error when trying to install on pip
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.
I get the same error with python3.10
same probleme here Python 3.9.2 2.7.18
same error here with python 3.8.10
same error here with all the python versions
Same, Fedora 35, latest pip & python
same error here with Windows11 ,latest python & pip
Happens on video-to-ascii
>= 1.2.9
pip installing "video-to-ascii == 1.2.8"
worked for me
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
pip3 install -U video-to-ascii==1.2.8
works fine for me
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
Be sure to install opencv-python
and xtermcolor