I'm trying to host my discord chatbot on Heroku, so I created a requirements.txt
file and pushed it to github. I've connected my github account with Heroku, but I can't deploy the main branch correctly.
This is the content of requirements.txt
.
aiohttp==3.7.4.post0
async-generator==1.10
async-timeout==3.0.1
attrs==22.1.0
beautifulsoup4==4.11.1
certifi==2022.6.15
cffi==1.15.1
chardet==4.0.0
charset-normalizer==2.1.0
cryptography==37.0.4
discord.py==1.7.3
h11==0.13.0
html5lib==1.1
idna==3.3
lxml==4.9.1
multidict==6.0.2
numpy==1.23.1
outcome==1.2.0
pandas==1.4.3
pycparser==2.21
pyOpenSSL==22.0.0
PySocks==1.7.1
python-dateutil==2.8.2
python-dotenv==0.20.0
pytz==2022.1
pywin32==304
requests==2.28.1
selenium==4.3.0
six==1.16.0
sniffio==1.2.0
sortedcontainers==2.4.0
soupsieve==2.3.2.post1
trio==0.21.0
trio-websocket==0.9.2
typing_extensions==4.3.0
urllib3==1.26.11
webencodings==0.5.1
wsproto==1.1.0
yarl==1.8.1
I googled and found that I should use pypiwin32==304
instead of pywin32==304
.
So I changed it and start deploying, but another error occured.
ERROR: Could not find a version that satisfies the requirement pypiwin32==304 (from versions: 219, 223)
ERROR: No matching distribution found for pypiwin32==304
! Push rejected, failed to compile Python app.
! Push failed
So I changed the version to 223, then it says :
ERROR: Could not find a version that satisfies the requirement pywin32>=223 (from pypiwin32) (from versions: none)
ERROR: No matching distribution found for pywin32>=223
! Push rejected, failed to compile Python app.
! Push failed
Then I tried version 219, it says :
Collecting pypiwin32==219
Downloading pypiwin32-219.zip (4.8 MB)
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
╰─> [7 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/tmp/pip-install-fvi5_cyx/pypiwin32_8ebb01f7f7fb4adfaea52be9c21493c7/setup.py", line 121
print "Building pywin32", pywin32_version
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
[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
What happened here? I'm completely new to programming, what should I do to fix this error?