'Error occurs when trying to install mega.py using pip

I was trying to install mega.py, for a project I'm working on that needs the files to be uploaded to the Mega Cloud Server, using the command pip install mega.py and the following is shown in the cmd.

Collecting mega.py
  Using cached mega.py-1.0.8-py2.py3-none-any.whl (19 kB)
Collecting pycryptodome<4.0.0,>=3.9.6
  Using cached pycryptodome-3.14.1-cp35-abi3-win_amd64.whl (1.8 MB)
Collecting tenacity<6.0.0,>=5.1.5
  Using cached tenacity-5.1.5-py2.py3-none-any.whl (34 kB)
Collecting pathlib==1.0.1
  Using cached pathlib-1.0.1.tar.gz (49 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [1 lines of output]
      ERROR: Can not execute `setup.py` since setuptools is not available in the build environment.
      [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.

Can anyone help me out in figuring out what I should do to resolve this? I've been trying out solutions for this problem for a long time now!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source