-1

I have created virtual env with anaconda prompt and created my django project in that env. I have created repository on github and push my code there and also create app on heroku but when i am running this git push heroku main command, it showing me an error which I have given below:

ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: '/tmp/build/80754af9/asgiref_1605055780383/work'..

traceback:

PS C:\Users\AHMED\newrest\source> git push heroku main
Enumerating objects: 48, done.
Counting objects: 100% (48/48), done.
Delta compression using up to 4 threads
Compressing objects: 100% (44/44), done.
Writing objects: 100% (48/48), 16.22 KiB | 615.00 KiB/s, done.
Total 48 (delta 10), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----> Python app detected
remote:  !     Python has released a security update! Please consider upgrading to python-3.8.6
remote:        Learn More: https://devcenter.heroku.com/articles/python-runtimes
remote: -----> Installing python-3.8.5
remote: -----> Installing pip 20.1.1, setuptools 47.1.1 and wheel 0.34.2
remote: -----> Installing SQLite3
remote: -----> Installing requirements with pip
remote:        Processing /tmp/build/80754af9/asgiref_1605055780383/work
remote:        ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: '/tmp/build/80754af9/asgiref_1605055780383/work'
remote:
remote:  !     Push rejected, failed to compile Python app.
remote:
remote:  !     Push failed
remote: Verifying deploy...
remote:
remote: !       Push rejected to restlearnsignup.
remote:
To https://git.heroku.com/restlearnsignup.git
 ! [remote rejected] main -> main (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/restlearnsignup.git'

requirement file

asgiref @ file:///tmp/build/80754af9/asgiref_1605055780383/work
astroid==2.4.1
certifi==2020.12.5
cffi==1.14.4
chardet==3.0.4
click==7.1.2
colorama==0.4.3
cryptography==3.3.1
decorator==4.4.2
Django==3.0.3
django-rest-knox==4.1.0
djangorestframework==3.12.2
dodgy==0.2.1
dynaconf==3.1.2
flake8==3.8.3
flake8-polyfill==1.0.2
gender-guesser==0.4.0
gunicorn==20.0.4
hvac==0.10.5
idna==2.10
isort==4.3.21
knox==0.1.11
lazy-object-proxy==1.4.3
loguru==0.5.3
mccabe==0.6.1
pep8-naming==0.10.0
prospector==1.3.0
pycodestyle==2.6.0
pycparser==2.20
pydocstyle==5.0.2
pyflakes==2.2.0
pylint==2.5.2
pylint-celery==0.3
pylint-django==2.0.15
pylint-flask==0.6
pylint-plugin-utils==0.6
pytz @ file:///tmp/build/80754af9/pytz_1606604771399/work
PyYAML==5.3.1
requests==2.25.0
requirements-detector==0.7
setoptconf==0.2.0
shortuuid==1.0.1
six==1.15.0
snowballstemmer==2.0.0
sqlparse @ file:///tmp/build/80754af9/sqlparse_1602184451250/work
toml==0.10.1
tqdm @ file:///tmp/build/80754af9/tqdm_1607369919789/work
urllib3==1.26.2
validators==0.18.1
whitenoise==5.2.0
win32-setctime==1.0.3
wincertstore==0.2
wrapt==1.12.1

Anyone who know how to resolve this error ?. I learning deployment and I don't know much about this. I research but couldn't found anything helpful.

2
  • show us your requirements file
    – iklinac
    Commented Dec 15, 2020 at 18:39
  • @iklinac I updated the question with that file Commented Dec 15, 2020 at 18:42

2 Answers 2

1

Use:

$ pip list

And edit the requirements.txt file to replace the temporary file with the actual version of the packages

0

Edit your requirements to point to asgiref version instead of temporary file

For example

asgiref==3.3.1
6
  • I updated my requirement file with asgiref==3.3.1 and it resolved the error but after proceeding further it gave me some kind of similar error as you can see ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: '/tmp/build/80754af9/pytz_1606604771399/work' Commented Dec 15, 2020 at 19:11
  • you have to do similar for the rest of packages that do not have numbers
    – iklinac
    Commented Dec 15, 2020 at 19:14
  • Can i give 3.3.1 to rest of all ? Commented Dec 15, 2020 at 19:15
  • no you have to use proper version for each of packages
    – iklinac
    Commented Dec 15, 2020 at 19:16
  • Okay so it means i can just put latest versions of rest of entries. Commented Dec 15, 2020 at 19:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.