Could not find a version that satisfies the requirement pywin32==227 heroku

Question:

I am having this issue with heroku.
i am trying to push my application to heroku but
it seems that heroku can not install pywin32=227 but i do not know why is this happening.
i hope that someone can help me whit this issue.

Requirements.txt:

appdirs==1.4.3
asgiref==3.2.3
awsebcli==3.17.1
botocore==1.14.17
cement==2.8.2
certifi==2019.11.28
chardet==3.0.4
colorama==0.3.9
distlib==0.3.0
dj-database-url==0.5.0
Django==2.1.15
django-pyodbc-azure==2.1.0.0
docutils==0.15.2
filelock==3.0.12
future==0.16.0
gunicorn==20.0.4
idna==2.7
importlib-metadata==1.5.0
jmespath==0.9.5
pathspec==0.5.9
Pillow==7.0.0
psycopg2==2.8.4
pyodbc==4.0.30
pypiwin32==223
python-dateutil==2.8.0
python-decouple==3.3
pytz==2019.3
pywin32==227
PyYAML==5.2
requests==2.20.1
semantic-version==2.5.0
six==1.11.0
sqlparse==0.3.1
stripe==2.43.0
termcolor==1.1.0
urllib3==1.24.3
virtualenv==20.0.7
wcwidth==0.1.8
whitenoise==5.0.1
zipp==3.1.0

I’m developing on Windows 10 Professional, and the application works fine there:

C:UsersGuGarzatest>git push heroku master
Enumerating objects: 363, done.
Counting objects: 100% (363/363), done.
Delta compression using up to 4 threads
Compressing objects: 100% (348/348), done.
Writing objects: 100% (363/363), 257.21 KiB | 1.42 MiB/s, done.
Total 363 (delta 107), reused 0 (delta 0)

remote:          Downloading pytz-2019.3-py2.py3-none-any.whl (509 kB)
remote:        ERROR: Could not find a version that satisfies the requirement pywin32==227 (from -r 
/tmp/build_000de559e8272ea11b28b5ee568bf649/requirements.txt (line 28)) (from versions: none)
remote:        ERROR: No matching distribution found for pywin32==227 (from -r 
/tmp/build_000de559e8272ea11b28b5ee568bf649/requirements.txt (line 28))
remote:  !     Push rejected, failed to compile Python app.
remote:
remote:  !     Push failed
remote: Verifying deploy...
remote:
remote: !       Push rejected to memotion.
remote:
To https://git.heroku.com/memotion.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/memotion.git'
Asked By: Guillermo Garza

||

Answers:

I got the same error while deploying flask app in azure app server.

Removing/commentting out pywin32==227 in requirements.txt worked for me.

Answered By: Nilanjan Das Khan

Conditional dependencies is a better choice in this situation. This way you don’t break things on Windows.

Add ;platform_system == "Windows" right after the Windows-only packages

Answered By: realsarm

I had the same problem in Pycharm.

Installing new version or packages like pypiwin32 did not work as described above.
Removing packages from the req file did not work either.

I copied my dev files, then I deleted the project.
I set up a completely new project and copied the Py files into it.
It worked.

The cause for the error message above was:

I did corrupt my project by trying to install chart_studio with pip, which did not work. It only works with Conda.
This corrupted my req and my site packages.

Answered By: Ormetrom2354

pip install pypiwin32 try this it will done

Answered By: Vivek Nath
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.