I am trying to deploy my first Plotly Dash app (written in Python) to Heroku. I am having trouble with bundling up all the packages to compile the app, currently with Python-javabridge.
When I try to deploy my app, even after deleting python-javabridge from the requirements.txt
, it still tries to bundle it, giving me the following error:
remote: Collecting jeepney>=0.4.2; sys_platform == "linux"
remote: Downloading jeepney-0.6.0-py3-none-any.whl (45 kB)
remote: Collecting importlib-resources; python_version < "3.7"
remote: Downloading importlib_resources-4.1.1-py3-none-any.whl (22 kB)
remote: Collecting python-javabridge==4.0.0
remote: Downloading python-javabridge-4.0.0.tar.gz (1.3 MB)
remote: ERROR: Command errored out with exit status 1:
remote: command: /app/.heroku/python/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-qllzoihk/python-javabridge/setup.py'"'"'; __file__='"'"'/tmp/pip-install-qllzoihk/python-javabridge/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-xeh4coov
remote: cwd: /tmp/pip-install-qllzoihk/python-javabridge/
remote: Complete output (11 lines):
remote: Traceback (most recent call last):
remote: File "<string>", line 1, in <module>
remote: File "/tmp/pip-install-qllzoihk/python-javabridge/setup.py", line 412, in <module>
remote: ext_modules=ext_modules(),
remote: File "/tmp/pip-install-qllzoihk/python-javabridge/setup.py", line 96, in ext_modules
remote: java_home = find_javahome()
remote: File "/tmp/pip-install-qllzoihk/python-javabridge/javabridge/locate.py", line 133,
in find_javahome
remote: java_bin = get_out(["bash", "-c", "type -p java"])
remote: File "/tmp/pip-install-qllzoihk/python-javabridge/javabridge/locate.py", line 130,
in get_out
remote: raise Exception("Error finding javahome on linux: %s" % cmd)
remote: Exception: Error finding javahome on linux: ['bash', '-c', 'type -p java']
remote: ----------------------------------------
remote: ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
remote: ! Push rejected, failed to compile Python app.
remote:
remote: ! Push failed
What I have done:
Just running pip install javabridge
works perfectly, no problems.
I added JAVA_HOME
to my system variables and to path, didn't help. Writing javac
or java --version
on the cmd outputs the version as expected.
I use Windows 10, Python 3.7, Anaconda3, Spyder terminal to run the commands.
git status
and post the requirements. – Xeres