0

I'm running git push heroku master to deploy my first app to heroku. I was getting various errors to do with the dependencies, so after following the advice here: Heroku Upload - Could not find a version that satisfies the requirement anaconda-client==1.4.0 I removed all the 'problematic' packages from requiremets.txt file. One of these packages was python-javabridge.

Once it reached the end however, it is still trying to install python-javabridge, giving the following error:

remote:        Collecting zope.interface
remote:          Downloading zope.interface-5.2.0-cp36-cp36m-manylinux2010_x86_64.whl (236 kB)
remote:        Collecting contextvars; python_version < "3.7"
remote:          Downloading contextvars-2.4.tar.gz (9.6 kB)
remote:        Collecting mccabe<0.7.0,>=0.6.0
remote:          Downloading mccabe-0.6.1-py2.py3-none-any.whl (8.6 kB)
remote:        Collecting jupyterlab-widgets>=1.0.0; python_version >= "3.5"
remote:          Downloading jupyterlab_widgets-1.0.0-py3-none-any.whl (243 kB)
remote:        Collecting jupyter-server~=1.1
remote:          Downloading jupyter_server-1.1.4-py3-none-any.whl (184 kB)
remote:        Collecting SecretStorage>=3.2; sys_platform == "linux"
remote:          Downloading SecretStorage-3.3.0-py3-none-any.whl (14 kB)
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-e55bn7p7/python-javabridge/setup.py'"'"';
__file__='"'"'/tmp/pip-install-e55bn7p7/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-s9wk10ch
remote:                 cwd: /tmp/pip-install-e55bn7p7/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-e55bn7p7/python-javabridge/setup.py", line 412, in <module>
remote:                ext_modules=ext_modules(),
remote:              File "/tmp/pip-install-e55bn7p7/python-javabridge/setup.py", line 96, in ext_modules
remote:                java_home = find_javahome()
remote:              File "/tmp/pip-install-e55bn7p7/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-e55bn7p7/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
remote: Verifying deploy...
remote:
remote: !       Push rejected to ...
remote:

Before starting this I updated all packages with conda update --all. I am using Windows 10 64-bit. Anaconda. Python 3.7. Spyder 4.2.0 IDE. Spyder terminal for the commands. How do I fix this Linux env variable problem from my Windows machine, or how do I get it not to install javabridge at all? Thanks in advance!

ISquared
  • 364
  • 4
  • 22

1 Answers1

0

I faced a similar problem but with different libraries (pyspark, and more 2 ipython-something).

The easier solution I found was to remove this library from the requirements.txt;

Does the app depend on this library? Have you tried to remove this library?

Sometimes, it was installed only because you have used conda to install some libraries.

Leonardo Ferreira
  • 673
  • 1
  • 6
  • 22
  • Thanks @Leonardo Ferreira, I had already deleted python-javabridge together with a bunch of other packages from the requirement list ,as they are all erroring out. However, after the list of packages was bundled up, it comes back to wanting to install javabridge (and who knows what else after that ... ) :( – ISquared Jan 06 '21 at 10:16
  • Have you tried to install all the libraries from scratch using pip instead of using conda? Could you give more information about your application? Is it a jupyter notebook or it's a .py file? – Leonardo Ferreira Jan 06 '21 at 21:31
  • I had installed all of them with pip install (I prefer that to conda). Then I followed instructions in a forum to update all of them with conda, so I did. The application is a .py file, a plotly-dash application. I'm not sure it really needs java, so very confused why it keeps insisting to install it. It's very frustrating as I can't find anything like this online and I'm running out of time :( – ISquared Jan 06 '21 at 21:39