Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

247
Visualizações
Heroku error : Compiled slug size: 624.7M is too large (max is 300M) - using miniconda for scipy and numpy

I am working with Python 2.7.11, Django 1.9 and Heroku.

I need to use scipy and numpy. Everything works well locally but Heroku returns an error when I push the application : "Compiled slug size: 624.7M is too large (max is 300M)"

I therefore deleted the buildpack Heroku/Python and added this one: https://github.com/kennethreitz/conda-buildpack

I kept the file requirements.txt:

django==1.9.2
boto==2.41.0
dj-database-url==0.4.1
Django==1.9.2
django-allauth==0.28.0
django-appconf==1.0.2
django-autocomplete-light==3.1.6
django-toolbelt==0.0.1
gunicorn==19.6.0
pep8==1.7.0
Pillow==4.0.0
psycopg2==2.6.1
pytz==2016.10
sorl-thumbnail==12.3
virtualenv==15.1.0
sendgrid==3.2.10
python_http_client==2.2.1
django-s3-folder-storage==0.3
django-debug-toolbar==1.5
celery==3.1.25
redis==2.10.5
tweepy==3.5.0
geopy==1.11.0
django-mptt==0.8.7
mistune==0.7.3
django-widget-tweaks==1.4.1
django-cleanup == 0.4.2
django-unused-media == 0.1.6
python-memcached == 1.58
python-binary-memcached == 0.26.0
django-bmemcached == 0.2.3
whitenoise==3.2
coverage == 4.3.4
raven == 6.0.0
newrelic == 2.82.0.62
ajaxuploader==0.3.8
awscli==1.10.47
botocore==1.4.37
colorama==0.3.7
dj-static==0.0.6
django-libs==1.67.4
django-user-media==1.2.3
docutils==0.12
ecdsa==0.13
flake8==2.5.4
jmespath==0.9.0
mccabe==0.5.0
oauthlib==1.1.2
paramiko==2.0.1
pyasn1==0.1.9
pycrypto==2.6.1
pyflakes==1.2.3
python-openid==2.2.5
requests==2.9.1
requests-oauthlib==0.6.1
rsa==3.4.2
s3transfer==0.0.1
simplejson==3.8.2
six==1.10.0
static3==0.7.0
futures==3.0.5

and added a conda-requirements.txt with:

nomkl
python=2.7.11
numpy=1.11.1
scipy=0.19.0
scikit-learn==0.18.1

Here is the complete Heroku build log (too many lines to fit here):

https://gist.github.com/jpuaux/74cb50a6cfb2dcab80d25d1809ae01c2

Please note that I purged Heroku cache with:

heroku repo:purge_cache -a myapp

Thanks for any help you can provide!

about 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Did you use Anaconda? I had the same problem the slug file was 505M, then I created a virtual env with pip and got one only 237M My requirements.txt: I created a new virtual env using pip instead of conda.

pip install virtualenv
cd my_project_folder
virtualenv my_project

Then I installed the packages I needed, this is my list in requirements.txt:

certifi==2018.10.15
chardet==3.0.4
Click==7.0
cycler==0.10.0
decorator==4.3.0
Flask==1.0.2
gunicorn==19.9.0
idna==2.7
ipython-genutils==0.2.0
itsdangerous==1.1.0
Jinja2==2.10
jsonschema==2.6.0
jupyter-core==4.4.0
kiwisolver==1.0.1
MarkupSafe==1.0
matplotlib==3.0.1
nbformat==4.4.0
nltk==3.3
numpy==1.15.3
pandas==0.23.4
Pillow==5.3.0
plotly==3.3.0
pyparsing==2.2.2
python-dateutil==2.7.4
pytz==2018.6
requests==2.20.0
retrying==1.3.3
scikit-learn==0.20.0
scipy==1.1.0
six==1.11.0
sklearn==0.0
SQLAlchemy==1.2.12
traitlets==4.3.2
urllib3==1.24
Werkzeug==0.14.1
wordcloud==1.5.0

Then I uploaded to heroku and it went through.

about 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda