Zero6992 / chatGPT-discord-bot

Integrate ChatGPT into your own discord bot
GNU General Public License v2.0
2.65k stars 698 forks source link

Error when using pip install -r requirements.txt (on ubuntu) #163

Closed halfwaysleet closed 1 year ago

halfwaysleet commented 1 year ago

`~/chatGPT-discord-bot$ pip install -r requirements.txt Defaulting to user installation because normal site-packages is not writeable Collecting discord.py==2.1.0 Using cached discord.py-2.1.0-py3-none-any.whl (1.1 MB) Collecting revChatGPT==1.1.6 Using cached revChatGPT-1.1.6-py3-none-any.whl (21 kB) Collecting aiohttp<4,>=3.7.4 Using cached aiohttp-3.8.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.0 MB) Collecting tiktoken Using cached tiktoken-0.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.6 MB) Collecting openai Using cached openai-0.26.5.tar.gz (55 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 ╰─> [81 lines of output] Traceback (most recent call last): File "/usr/lib/python3/dist-packages/setuptools/config.py", line 419, in _parse_attr return getattr(StaticModule(module_name), attr_name) File "/usr/lib/python3/dist-packages/setuptools/config.py", line 26, in init spec = importlib.util.find_spec(name) File "/usr/lib/python3.10/importlib/util.py", line 94, in find_spec parent = import(parent_name, fromlist=['path']) File "/tmp/pip-install-qxvhc4kg/openai_f04ba2caeee94cb6945c651aeacf648c/openai/init.py", line 9, in from openai.api_resources import ( File "/tmp/pip-install-qxvhc4kg/openai_f04ba2caeee94cb6945c651aeacf648c/openai/api_resources/init.py", line 1, in from openai.api_resources.completion import Completion # noqa: F401 File "/tmp/pip-install-qxvhc4kg/openai_f04ba2caeee94cb6945c651aeacf648c/openai/api_resources/completion.py", line 4, in from openai.api_resources.abstract import DeletableAPIResource, ListableAPIResource File "/tmp/pip-install-qxvhc4kg/openai_f04ba2caeee94cb6945c651aeacf648c/openai/api_resources/abstract/init.py", line 3, in from openai.api_resources.abstract.api_resource import APIResource File "/tmp/pip-install-qxvhc4kg/openai_f04ba2caeee94cb6945c651aeacf648c/openai/api_resources/abstract/api_resource.py", line 4, in from openai import api_requestor, error, util File "/tmp/pip-install-qxvhc4kg/openai_f04ba2caeee94cb6945c651aeacf648c/openai/api_requestor.py", line 21, in import aiohttp ModuleNotFoundError: No module named 'aiohttp'

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "/usr/lib/python3/dist-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
      main()
    File "/usr/lib/python3/dist-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/usr/lib/python3/dist-packages/pip/_vendor/pep517/in_process/_in_process.py", line 130, in get_requires_for_build_wheel
      return hook(config_settings)
    File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 162, in get_requires_for_build_wheel
      return self._get_build_requires(
    File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 143, in _get_build_requires
      self.run_setup()
    File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 158, in run_setup
      exec(compile(code, __file__, 'exec'), locals())
    File "setup.py", line 3, in <module>
      setup()
    File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 153, in setup
      return distutils.core.setup(**attrs)
    File "/usr/lib/python3/dist-packages/setuptools/_distutils/core.py", line 122, in setup
      dist.parse_config_files()
    File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 804, in parse_config_files
      parse_configuration(
    File "/usr/lib/python3/dist-packages/setuptools/config.py", line 158, in parse_configuration
      meta.parse()
    File "/usr/lib/python3/dist-packages/setuptools/config.py", line 498, in parse
      section_parser_method(section_options)
    File "/usr/lib/python3/dist-packages/setuptools/config.py", line 469, in parse_section
      self[name] = value
    File "/usr/lib/python3/dist-packages/setuptools/config.py", line 222, in __setitem__
      value = parser(value)
    File "/usr/lib/python3/dist-packages/setuptools/config.py", line 599, in _parse_version
      version = self._parse_attr(value, self.package_dir)
    File "/usr/lib/python3/dist-packages/setuptools/config.py", line 422, in _parse_attr
      module = importlib.import_module(module_name)
    File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
    File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
    File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
    File "<frozen importlib._bootstrap>", line 992, in _find_and_load_unlocked
    File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
    File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
    File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
    File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
    File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
    File "<frozen importlib._bootstrap_external>", line 883, in exec_module
    File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
    File "/tmp/pip-install-qxvhc4kg/openai_f04ba2caeee94cb6945c651aeacf648c/openai/__init__.py", line 9, in <module>
      from openai.api_resources import (
    File "/tmp/pip-install-qxvhc4kg/openai_f04ba2caeee94cb6945c651aeacf648c/openai/api_resources/__init__.py", line 1, in <module>
      from openai.api_resources.completion import Completion  # noqa: F401
    File "/tmp/pip-install-qxvhc4kg/openai_f04ba2caeee94cb6945c651aeacf648c/openai/api_resources/completion.py", line 4, in <module>
      from openai.api_resources.abstract import DeletableAPIResource, ListableAPIResource
    File "/tmp/pip-install-qxvhc4kg/openai_f04ba2caeee94cb6945c651aeacf648c/openai/api_resources/abstract/__init__.py", line 3, in <module>
      from openai.api_resources.abstract.api_resource import APIResource
    File "/tmp/pip-install-qxvhc4kg/openai_f04ba2caeee94cb6945c651aeacf648c/openai/api_resources/abstract/api_resource.py", line 4, in <module>
      from openai import api_requestor, error, util
    File "/tmp/pip-install-qxvhc4kg/openai_f04ba2caeee94cb6945c651aeacf648c/openai/api_requestor.py", line 21, in <module>
      import aiohttp
  ModuleNotFoundError: No module named 'aiohttp'
  [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. `

Zero6992 commented 1 year ago

Python version and pip version?

steelButton commented 1 year ago

Download Pip: get-pip.py

halfwaysleet commented 1 year ago

Python version and pip version? image files: image

yangkghjh commented 1 year ago
sudo apt install python3-aiohttp