-3

while I was developing in the Build main section got these errors

Collecting importlib==1.0.4
         Downloading importlib-1.0.4.zip (7.1 kB)
         Preparing metadata (setup.py): started
         Preparing metadata (setup.py): finished with status '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.
 !     Push rejected, failed to compile Python app.
 !     Push failed
James Z
  • 12,209
  • 10
  • 24
  • 44
  • Hi @MFaisalQasim! Welcome to StackOverflow! Please refer to this post to see why you should not add words like "urgent" in your question: [Under what circumstances may I add "urgent" or other similar phrases to my question, in order to obtain faster answers?](//meta.stackoverflow.com/q/326569) – David Jul 31 '22 at 13:17

1 Answers1

0

I can see in the error this line: ERROR: Can not execute setup.py since setuptools is not available in the build environment which means you haven't added the setuptools module to the build environment of the project. Try to use pip install setuptools to install the module.

Maxisy
  • 50
  • 1
  • 6
  • i have run this command, but its already there "Requirement already satisfied: setuptools in c:\users\m faisal qasim\appdata\local\programs\python\python310\lib\site-packages (58.1.0)" – M Faisal Qasim Jul 31 '22 at 12:01
  • @MFaisalQasim what command did you use to run the Python program? – Maxisy Jul 31 '22 at 12:27
  • ```flask run```, the project runs fine on localhost it shows an error when I am deploying over Heroku. i am using Heroku GUI for deploying not cpmmands. – M Faisal Qasim Jul 31 '22 at 18:20