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

Installation of PyYAML fails #1902

Open
chaeynz opened this issue Nov 19, 2024 · 3 comments
Open

Installation of PyYAML fails #1902

chaeynz opened this issue Nov 19, 2024 · 3 comments

Comments

@chaeynz
Copy link

chaeynz commented Nov 19, 2024

Steps to reproduce:

wget https://github.com/smicallef/spiderfoot/archive/v4.0.tar.gz
tar zxvf v4.0.tar.gz
cd spiderfoot-4.0
pip3 install -r requirements.txt

System:

$ python3 -V
Python 3.11.2
$ uname -a
Linux hostname 6.1.0-26-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.112-1 (2024-09-30) x86_64 GNU/Linux

Error:

Collecting pyyaml==5.4.1 (from -r requirements.txt (line 26))
  Using cached PyYAML-5.4.1.tar.gz (175 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
  ╰─> [54 lines of output]
      running egg_info
      writing lib3/PyYAML.egg-info/PKG-INFO
      writing dependency_links to lib3/PyYAML.egg-info/dependency_links.txt
      writing top-level names to lib3/PyYAML.egg-info/top_level.txt
      Traceback (most recent call last):
        File "/home/template/spiderfoot-4.0/venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/home/template/spiderfoot-4.0/venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/template/spiderfoot-4.0/venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-yvp486jm/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 334, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=[])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-yvp486jm/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 304, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-yvp486jm/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 320, in run_setup
          exec(code, locals())
        File "<string>", line 271, in <module>
        File "/tmp/pip-build-env-yvp486jm/overlay/lib/python3.11/site-packages/setuptools/__init__.py", line 117, in setup
          return distutils.core.setup(**attrs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-yvp486jm/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 183, in setup
          return run_commands(dist)
                 ^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-yvp486jm/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 199, in run_commands
          dist.run_commands()
        File "/tmp/pip-build-env-yvp486jm/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 954, in run_commands
          self.run_command(cmd)
        File "/tmp/pip-build-env-yvp486jm/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 994, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-yvp486jm/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 973, in run_command
          cmd_obj.run()
        File "/tmp/pip-build-env-yvp486jm/overlay/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 312, in run
          self.find_sources()
        File "/tmp/pip-build-env-yvp486jm/overlay/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 320, in find_sources
          mm.run()
        File "/tmp/pip-build-env-yvp486jm/overlay/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 543, in run
          self.add_defaults()
        File "/tmp/pip-build-env-yvp486jm/overlay/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 581, in add_defaults
          sdist.add_defaults(self)
        File "/tmp/pip-build-env-yvp486jm/overlay/lib/python3.11/site-packages/setuptools/command/sdist.py", line 109, in add_defaults
          super().add_defaults()
        File "/tmp/pip-build-env-yvp486jm/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/sdist.py", line 238, in add_defaults
          self._add_defaults_ext()
        File "/tmp/pip-build-env-yvp486jm/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/sdist.py", line 323, in _add_defaults_ext
          self.filelist.extend(build_ext.get_source_files())
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "<string>", line 201, in get_source_files
        File "/tmp/pip-build-env-yvp486jm/overlay/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 107, in __getattr__
          raise AttributeError(attr)
      AttributeError: cython_sources
      [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.
(venv) user@hostname:~/spiderfoot-4.0$
@ajh216
Copy link

ajh216 commented Nov 19, 2024

Yeah the version of pyyaml in the main branch is out of date. Use the requirements file in the other branch and you should be fine.

@chaeynz
Copy link
Author

chaeynz commented Nov 19, 2024

Yeah the version of pyyaml in the main branch is out of date. Use the requirements file in the other branch and you should be fine.

Cant believe I didnt see the branch 😭 Thank you

@ebenhaezer19
Copy link

i can guide you bro

just make sure you have to make new file like requirements2.txt

   adblockparser>=0.7,<1
   dnspython>=2.3.0,<3
   ExifRead>=2.3.2,<3
   CherryPy>=18.8.0,<19
   cherrypy-cors>=1.6,<2
   Mako>=1.2.4,<2
   beautifulsoup4>=4.11.2,<5
   lxml>=4.9.2,<5
   netaddr>=0.8.0,<1
   pysocks>=1.7.1,<2
   requests>=2.28.2,<3
   ipwhois>=1.1.0,<1.2.0
   ipaddr>=2.2.0,<3
   phonenumbers>=8.13.6,<9
   pygexf>=0.2.2,<0.3
   PyPDF2>=1.28.6,<2
   python-whois>=0.7.3,<0.8
   secure>=0.3.0,<0.4.0
   pyOpenSSL>=21.0.0,<22
   python-docx>=0.8.11,<0.9
   python-pptx>=0.6.21,<0.7
   networkx>=2.6.3,<2.7
   cryptography>=3.4.8,<4
   publicsuffixlist>=0.9.3,<0.10
   openpyxl>=3.1.1,<4
   pyyaml==6.0.2  # Make sure this ONE

after that run
pip3 install -r requirements2.txt

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

3 participants