ddollar / heroku-buildpack-apt

120 stars 327 forks source link

"ImportError: No module named 'botocore'" but python3-botocore is installed #24

Closed temujin9 closed 8 years ago

temujin9 commented 9 years ago

I have awscli in the Aptfile, which depends on botocore.

The install returns:

-----> Installing python3-botocore_0.29.0+repack-2_all.deb

but later steps (which use the aws command) fail with:

remote: Traceback (most recent call last):
remote:   File "/tmp/build/.apt/usr/bin/aws", line 15, in <module>
remote:     import awscli.clidriver
remote:   File "/tmp/build/.apt/usr/share/awscli/awscli/clidriver.py", line 16, in <module>
remote:     import botocore.session
remote: ImportError: No module named 'botocore'
royalgarter commented 9 years ago

I have the same problem with the 'net-tools' apt. After some figuring out with Support team from Heroku, we found that the reason below

It seems like the tools are installed, if you run heroku run bash you'll find netstat in /app/.apt/bin however it seems the buildpack is adding /app/.apt/usr/bin to the PATH which doesn't contain the executables

So I using the temporary fix like this

PATH=$PATH:/app/.apt/bin;export PATH;node test

Hope we can have a quick fix in the buildpack soon :)