I am a complete beginner, but I have created a small website using Python / Django with the help of django-cookiecutter, including the deploy to Heroku instructions. I am in the process of deploying it for the first time to Heroku, however, the build is failing at the point in which it is running setup.py install for django-appconf, suggesting that it is due to the fact that Heroku already has the "Six" package.
The error message I am receiving is as follows:
Running setup.py install for django-appconf: finished with status 'error'
Complete output from command /app/.heroku/python/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-tzjhtkga/django-appconf/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-y2i8uuc4-record/install-record.txt --single-version-externally-managed --compile --without-c-extensions:
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help
error: option --without-c-extensions not recognized
----------------------------------------
Command "/app/.heroku/python/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-tzjhtkga/django-appconf/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-y2i8uuc4-record/install-record.txt --single-version-externally-managed --compile --without-c-extensions" failed with error code 1 in /tmp/pip-build-tzjhtkga/django-appconf/
! Hello! Your requirements.txt file contains the six package.
! This library is automatically installed by Heroku and shouldn't be in
! Your requirements.txt file. This can cause unexpected behavior.
! -- Much Love, Heroku.
! Push rejected, failed to compile Python app.
! Push failed
I did have the "Six" package listed separately in the requirements/base.txt file, but I have since removed this. I did identify further up in the logs that django-appconf seemed to generate another request for "Six" package. I removed this too hoping to see if the build would pass, it did not, but I have spotted another instance of "Six" package in the log as follows from within argon2:
Collecting six (from argon2-cffi==18.1.0->-r
/tmp/build_f411039f49a317bf73319f22d11e792e/XXXXXXXXXX-
78bf146/requirements/base.txt (line 26))
Downloading six-1.11.0.tar.gz
My simple site is not currently using any form of user login authentication, but I am still reluctant to remove this. I understand both packages are standard django-cookiecutter packages, so has anyone else has the same issue?
I'm on Django 1.11 and python 3.6 using windows.
Thank you Alasdair for your reply. As I'm collecting the requirements after reading your comment, I'm looking at the line "rcssmin==1.0.6 --install-option="--without-c-extensions"" as being the potential culprit?
Requirement file content:
wheel==0.30.0
django==1.11.9 # pyup: <2.0
# django-environ==0.4.4
whitenoise==3.3.1
django-crispy-forms==1.7.0
django-model-utils==3.1.1
Pillow==5.0.0
# argon2-cffi==18.1.0
django-allauth==0.34.0
awesome-slugify==1.6.5
pytz==2017.3
django-redis==4.8.0
redis==2.10.6
celery==3.1.25
rcssmin==1.0.6 --install-option="--without-c-extensions"
django-compressor==2.2
cookiecutter==1.6.0
coverage==4.4.2
decorator==4.2.1
defusedxml==0.5.0
django-appconf==1.0.2
django-bootstrap-datepicker==1.2.3
django-bower==5.2.0
django-coverage-plugin==1.5.0
django-debug-toolbar==1.9.1
django-extensions==1.9.9
django-test-plus==1.0.22
docutils==0.14
factory-boy==2.9.2
Faker==0.8.10
future==0.16.0
icalendar==4.0.0
idna==2.6
imagesize==0.7.1
invoke==0.22.0
ipdb==0.10.3
ipython==6.2.1
ipython-genutils==0.2.0
jedi==0.11.1
Jinja2==2.10
jinja2-time==0.2.0
kombu==3.0.37
MarkupSafe==1.0
oauthlib==2.0.6
olefile==0.44
parso==0.1.1
pickleshare==0.7.4
pluggy==0.6.0
poyo==0.4.1
prompt-toolkit==1.0.15
psycopg2==2.7.3.2
py==1.5.2
pycparser==2.18
Pygments==2.2.0
pytest==3.3.2
pytest-django==3.1.2
pytest-sugar==0.9.0
python-dateutil==2.6.1
python3-openid==3.1.0
regex==2018.1.10
requests==2.18.4
requests-oauthlib==0.8.0
rjsmin==1.0.12
simplegeneric==0.8.1
snowballstemmer==1.2.1
Sphinx==1.6.6
sphinxcontrib-websupport==1.0.1
sqlparse==0.2.4
termcolor==1.1.0
text-unidecode==1.1
traitlets==4.3.2
typing==3.6.2
Unidecode==0.4.21
urllib3==1.22
wcwidth==0.1.7
Werkzeug==0.14.1
whichcraft==0.4.1
wincertstore==0.2
UPDATE: removing the "--install-option="--without-c-extensions"" section from rcssmin==1.0.6 appears to have cleared that particular error, thank you for your help (I'm now onto another one :(, hopefully not as challenging for me).
When installing the requiements in Heroku, you should remove the --install-option="--without-c-extensions"
.
Note that you do require the option when installing the requirements in Windows.