how to solve this errorss?egg_info? - python

Collecting playsound
Using cached playsound-1.3.0.tar.gz (7.7 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [12 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 14, in <module>
File "C:\Users\sunka\anaconda3\lib\site-packages\setuptools\__init__.py", line 12, in <module>
from setuptools.extension import Extension
File "C:\Users\sunka\anaconda3\lib\site-packages\setuptools\extension.py", line 7, in <module>
from setuptools.dist import _get_unpatched
File "C:\Users\sunka\anaconda3\lib\site-packages\setuptools\dist.py", line 16, in <module>
import pkg_resources
File "C:\Users\sunka\anaconda3\lib\site-packages\pkg_resources.py", line 1479, in <module>
register_loader_type(importlib_bootstrap.SourceFileLoader, DefaultProvider)
AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader'
[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.

After searching errors for a long time I came up with this solution; But it depends on setuptools which may be incompatible for different packages
First do;
pip3 install --upgrade setuptools
NEXT;
pip3 install playsound
pip install playsound

Related

Trying to install this git+https://github.com/mmabrouk/chatgpt-wrapper on my windows terminal

Resolved https://github.com/mmabrouk/chatgpt-wrapper to commit f2d1101cb2f0e1b57fa9fef647a0eef04fea7e5c
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [10 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:\Users\Cesmz\AppData\Local\Temp\pip-req-build-jgb3slo2\setup.py", line 2, in <module>
from chatgpt_wrapper.chatgpt import VERSION
File "C:\Users\Cesmz\AppData\Local\Temp\pip-req-build-jgb3slo2\chatgpt_wrapper\__init__.py", line 1, in <module>
from .chatgpt import ChatGPT
File "C:\Users\Cesmz\AppData\Local\Temp\pip-req-build-jgb3slo2\chatgpt_wrapper\chatgpt.py", line 16, in <module>
from rich.console import Console
ModuleNotFoundError: No module named 'rich'
[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 tried it on Kali and it worked fine, but kali is not supported by playwright. I need playwright to run the chatgpt command...
Anyone know what OS can run these commands in https://github.com/mmabrouk/chatgpt-wrapper ?

Trying to pip install but get ```TypeError: 'Version' object is not subscriptable```

I'm on ubuntu and tried to install tardis by using:
pip install tardis-sn
but the output i got was:
Defaulting to user installation because normal site-packages is not writeable
Collecting tardis-sn
Using cached tardis-sn-1.0.1.tar.gz (1.1 MB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [14 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/tmp/pip-install-4mc4s8kc/tardis-sn_98dc7e578b0a49ada4013a6ad17ba118/setup.py", line 8, in <module>
import ah_bootstrap
File "/tmp/pip-install-4mc4s8kc/tardis-sn_98dc7e578b0a49ada4013a6ad17ba118/ah_bootstrap.py", line 530, in <module>
_main()
File "/tmp/pip-install-4mc4s8kc/tardis-sn_98dc7e578b0a49ada4013a6ad17ba118/ah_bootstrap.py", line 527, in _main
use_astropy_helpers(**kwargs)
File "/tmp/pip-install-4mc4s8kc/tardis-sn_98dc7e578b0a49ada4013a6ad17ba118/ah_bootstrap.py", line 198, in use_astropy_helpers
upgrade = _do_upgrade(dist, index_url)
File "/tmp/pip-install-4mc4s8kc/tardis-sn_98dc7e578b0a49ada4013a6ad17ba118/ah_bootstrap.py", line 285, in _do_upgrade
major, minor = (int(part) for part in dist.parsed_version[:2])
TypeError: 'Version' object is not subscriptable
[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.
Please help me get rid of this error
I have tried using
pip install tardis-sn --use-deprecated=legacy-resolver
but the output i got was still the same

Why do I install ffmpeg-python error via pip, python on version 3.9.13 and pip on version 22.2.1

$ pip3 install ffmpeg-python
Collecting ffmpeg-python
Using cached ffmpeg_python-0.2.0-py3-none-any.whl (25 kB)
Collecting future
Downloading future-0.18.2.tar.gz (829 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 829.2/829.2 kB 5.2 MB/s eta 0:00:00
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [12 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 14, in <module>
File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 14, in <module>
from setuptools.dist import Distribution, Feature
File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 24, in <module>
from setuptools.depends import Require
File "/usr/lib/python3/dist-packages/setuptools/depends.py", line 7, in <module>
from .py33compat import Bytecode
File "/usr/lib/python3/dist-packages/setuptools/py33compat.py", line 54, in <module>
unescape = getattr(html, 'unescape', html_parser.HTMLParser().unescape)
AttributeError: 'HTMLParser' object has no attribute 'unescape'
[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.
enter image description here
It is working for me.
Python version - 3.7.1,
pip version - 22.1.2

Problem with Installation of audio.coders: "ModuleNotFoundError: No module named 'ConfigParser'"

I have a problem installing audio.coder in python3.
Requirement already satisfied: configparser in c:\users/lib\site-packages(installed already) (4.0.2).
Error:
Using cached audio.coders-4.0.2.tar.gz (682 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [6 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/private/var/folders/18/dg9nnkwj33qd7hwq8nmkqp1r0000gn/T/pip-install-pwqm3pw1/audio-coders_ffbe7e1c37a748f9b4da82b85363aaee/setup.py", line 5, in <module>
import ConfigParser
ModuleNotFoundError: No module named 'ConfigParser'
[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.

Getting error while installing 'formatter' module

I am trying to install formatter using,
pip install formatter
but it throws the following error,
Collecting formatter
Using cached formatter-1.0.3.tar.gz (17 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [10 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/private/var/folders/2b/x_hy0wt13mgcbznrm263kzmr0000gr/T/pip-install-l76arg1s/formatter_b9bbf1e04d7a4bda8f51556e744f0357/setup.py", line 2, in <module>
import formatter as metadata
File "/private/var/folders/2b/x_hy0wt13mgcbznrm263kzmr0000gr/T/pip-install-l76arg1s/formatter_b9bbf1e04d7a4bda8f51556e744f0357/formatter/__init__.py", line 9, in <module>
from .formatter import Formatter
File "/private/var/folders/2b/x_hy0wt13mgcbznrm263kzmr0000gr/T/pip-install-l76arg1s/formatter_b9bbf1e04d7a4bda8f51556e744f0357/formatter/formatter.py", line 4, in <module>
from cStringIO import StringIO
ModuleNotFoundError: No module named 'cStringIO'
[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 tried installing cStringIO but it throws another error,
ERROR: Could not find a version that satisfies the requirement cStringIO (from versions: none)
ERROR: No matching distribution found for cStringIO
Can anyone help me ?
This package was removed from python 3.10 (see latest doc from 3.9). You should update the code to not use the formatter module.

Categories