MehmetMHY / cha

A simple CLI chat tool to easily interface with OpenAI's models
MIT License
30 stars 2 forks source link

[BUG] : You're trying to run a very old release of Beautiful Soup under Python 3. This will not work."<>"Please use Beautiful Soup 4, available through the pip package 'beautifulsoup4 #14

Closed dhruv-scogo closed 1 day ago

dhruv-scogo commented 1 week ago

Command : pip install cha

Error :

  Using cached cha-0.2.tar.gz (3.2 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Collecting requests>=2.2.1 (from cha)
  Using cached requests-2.32.3-py3-none-any.whl.metadata (4.6 kB)
Collecting BeautifulSoup>=3.2.1 (from cha)
  Using cached BeautifulSoup-3.2.2.tar.gz (32 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
  ╰─> [22 lines of output]
      Traceback (most recent call last):
        File "C:\Users\DHRUV PATEL\Desktop\Scraping\cha\me\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
          main()
        File "C:\Users\DHRUV PATEL\Desktop\Scraping\cha\me\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\DHRUV PATEL\Desktop\Scraping\cha\me\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\DHRUV PATEL\AppData\Local\Temp\pip-build-env-jdq3f0pk\overlay\Lib\site-packages\setuptools\build_meta.py", line 325, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\DHRUV PATEL\AppData\Local\Temp\pip-build-env-jdq3f0pk\overlay\Lib\site-packages\setuptools\build_meta.py", line 295, in _get_build_requires
          self.run_setup()
        File "C:\Users\DHRUV PATEL\AppData\Local\Temp\pip-build-env-jdq3f0pk\overlay\Lib\site-packages\setuptools\build_meta.py", line 487, in run_setup
          super().run_setup(setup_script=setup_script)
        File "C:\Users\DHRUV PATEL\AppData\Local\Temp\pip-build-env-jdq3f0pk\overlay\Lib\site-packages\setuptools\build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 3
          "You're trying to run a very old release of Beautiful Soup under Python 3. This will not work."<>"Please use Beautiful Soup 4, available through the pip package 'beautifulsoup4'."
                                                                                                         ^^
      SyntaxError: invalid syntax
      [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.
(me) PS C:\Users\DHRUV PATEL\Desktop\Scraping\cha\cha> 

The module cha had previous version of beautifulsoup4 which is beautifulsoup4==3.2.1

when i executed the command : pip install beautifulsoup4==3.2.1

ERROR :

Could not find a version that satisfies the requirement beautifulsoup4==3.2.1 (from versions: 4.0.1, 4.0.2, 4.0.3, 4.0.4, 4.0.5, 4.1.0, 4.1.1, 4.1.2, 4.1.3, 4.2.0, 4.2.1, 4.3.0, 4.3.1, 4.3.2, 4.4.0, 4.4.1, 4.5.0, 4.5.1, 4.5.2, 4.5.3, 4.6.0, 4.6.1, 4.6.2, 4.6.3, 4.7.0, 4.7.1, 4.8.0, 4.8.1, 4.8.2, 4.9.0, 4.9.1, 4.9.2, 4.9.3, 4.10.0, 4.11.0, 4.11.1, 4.11.2, 4.12.0, 4.12.1, 4.12.2, 4.12.3, 4.13.0b2)
ERROR: No matching distribution found for beautifulsoup4==3.2.1

Please help me regarding this issue

MehmetMHY commented 1 week ago

Hey @dhruv-scogo. Currently Cha is not hosted in PyPi so doing pip install cha will not work. It will instead install another, older, package that has the same name. To install Cha, clone the repo:

git clone https://github.com/MehmetMHY/cha.git

Then go into the cloned repo:

cd cha/

And then install it using the clone code:

pip3 install --upgrade .

I am planning on adding Cha to PyPi when I get the time. But for now, this is the method for installing Cha.

MehmetMHY commented 1 week ago

Hey @dhruv-scogo let me know if you need anything else. Otherwise I will close this issue by Monday (June 24, 2024).