install python openbabel package heroku - heroku

Trying to install openbabel on heroku. I placed this line in my requirements.txt file: openbabel==2.4.1. I normally install openbabel to my local computer using anaconda. Looks like it has a dependency named SWIG but a search online indicates SWIG can be installed using homebrew, so how can I achieve that on heroku? I'm not sure what to do. Any help is appreciated. Currently, it is giving me this error message:
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Python app detected
remote: -----> Installing requirements with pip
remote: Collecting openbabel==2.4.1 (from -r /tmp/build_638971ef340164a92179a4dbad289d2c/requirements.txt (line 96))
remote: Downloading https://files.pythonhosted.org/packages/9c/30/eb9c3d3d3b86981f6c6a7b8eceb6f4a13b9a12673efbc842b7cebe0ce39a/openbabel-2.4.1.tar.gz (74kB)
remote: Installing collected packages: openbabel
remote: Running setup.py install for openbabel: started
remote: Running setup.py install for openbabel: finished with status 'error'
remote: Complete output from command /app/.heroku/python/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-279snh2u/openbabel/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-zs8un8_p-record/install-record.txt --single-version-externally-managed --compile:
remote: running install
remote: running build_ext
remote: Warning: package openbabel-2.0 could not be found by pkg-config.
remote: Guessing Open Babel location:
remote: - include_dirs: ['/app/.heroku/python/include/python3.6m', '/usr/local/include/openbabel-2.0']
remote: - library_dirs: ['/usr/local/lib']
remote: building '_openbabel' extension
remote: swigging openbabel-python.i to openbabel-python_wrap.cpp
remote: swig -python -c++ -small -O -templatereduce -naturalvar -I/app/.heroku/python/include/python3.6m -I/usr/local/include/openbabel-2.0 -o openbabel-python_wrap.cpp openbabel-python.i
remote: unable to execute 'swig': No such file or directory
remote:
remote: Error: SWIG failed. Is Open Babel installed?
remote: You may need to manually specify the location of Open Babel include and library directories. For example:
remote: python setup.py build_ext -I/usr/local/include/openbabel-2.0 -L/usr/local/lib
remote: python setup.py install
remote:
remote: ----------------------------------------
remote: Command "/app/.heroku/python/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-279snh2u/openbabel/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-zs8un8_p-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-279snh2u/openbabel/
remote: ! Push rejected, failed to compile Python app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to chemitry-app.
remote:
To https://git.heroku.com/chemitry-app.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/chemitry-app.git'
(

Related

whenever i try to push in Heroku,i get this error ."Cargo, the Rust package manager, is not installed or is not on PATH." how to resolve?

Preparing metadata (pyproject.toml): started
remote: Preparing metadata (pyproject.toml): finished with status 'error'
remote: error: subprocess-exited-with-error
remote:
remote: × Preparing metadata (pyproject.toml) did not run successfully.
remote: │ exit code: 1
remote: ╰─> [6 lines of output]
remote: Checking for Rust toolchain...
remote:
remote: Cargo, the Rust package manager, is not installed or is not on PATH.
remote: This package requires Rust and Cargo to compile extensions. Install it through
remote: the system's package manager or via https://rustup.rs/
remote:
remote: [end of output]
remote:
remote: note: This error originates from a subprocess, and is likely not a problem with pip.
remote: error: metadata-generation-failed
remote:
remote: × Encountered error while generating package metadata.
remote: ╰─> See above for output.
remote:
remote: note: This is an issue with the package mentioned above, not pip.
remote: hint: See above for details.
remote: ! Push rejected, failed to compile Python app.
remote:
remote: ! Push failed
You're going to need to use multiple buildpacks, one for Rust and another for Python.
Rust is not officially supported, but several community options exist. Pick one, then configure your application:
Set your application to use the Python buildpack:
heroku buildpacks:set heroku/python
Add your chosen Rust buildpack:
heroku buildpacks:add --index 1 YOUR_CHOSEN_BUILDPACK
Run heroku buildpacks to ensure they are correct. You should see the Rust buildpack first, and the Python buildpack second.
Finally, redeploy your application.

Heroku deployment - java_home not found for javabridge package NOT on requirements.txt

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!
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.

not able to push the repo to Heroku

I'm getting
error: RPC failed; curl 56 LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54
when I try to push to Heroku , this is not a first push I have this app deployed in Heroku already, but all of a sudden Heroku started throwing this error.
I have tried
setting git config --global http.postBuffer 524288000
restarting all dynos
deleting Heroku project and creating it again.
tried pushing same repo to GitHub and it works fine.
I'm using macos-catalina
here is the complete error
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Node.js app detected
remote:
remote: -----> Creating runtime environment
remote:
remote: NPM_CONFIG_LOGLEVEL=error
remote: NODE_ENV=production
remote: NODE_MODULES_CACHE=true
remote: NODE_VERBOSE=false
remote:
remote: -----> Installing binaries
remote: engines.node (package.json): unspecified
remote: engines.npm (package.json): unspecified (use default)
remote:
remote: Resolving node version 12.x...
remote: Downloading and installing node 12.18.3
remote: Using default npm version: 6.14.6
remote:
remote: -----> Restoring cache
remote: - node_modules
remote:
remote: -----> Installing dependencies
remote: Installing node modules
error: RPC failed; curl 56 LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54
fatal: the remote end hung up unexpectedly
fatal: the remote end hung up unexpectedly
any help would be appreciated. thanks
In case any one is facing similar issues , check Heroku logs , in my case next.js build was taking too much memory so the deploy was getting rejected, eventhough push was success.

heroku fails to install pytables, error: /usr/bin/ld: cannot find -lhdf5

after folowwing the Get Started for Python on Heroku, I would like to add some packages which I installed locally without problems (Win10,Python 3.7).
One of these packages is pytables.
When I try to install the pytables package in heroku ,it fails with the following error: /usr/bin/ld: cannot find -lhdf5
Is there a way I can verify if HDF5 available on my dyno?
c:\Temp\python-getting-started>git push heroku master
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 4 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 301 bytes | 301.00 KiB/s, done.
Total 3 (delta 2), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Python app detected
remote: ! Python has released a security update! Please consider upgrading to python-3.7.1
remote: Learn More: https://devcenter.heroku.com/articles/python-runtimes
remote: -----> Installing requirements with pip
remote: Collecting tables (from -r /tmp/build_2935f6f96f28f37f686b7fbf4fc38a83/requirements.txt (line 9))
remote: Downloading https://files.pythonhosted.org/packages/4d/53/8f34ce887c2a2ad80518980419a5f6f41defc85a287a355987e559ce9385/tables-3.4.4.tar.gz (4.6MB)
remote: Complete output from command python setup.py egg_info:
remote: * Using Python 3.7.0 (default, Aug 1 2018, 21:17:03)
remote: * USE_PKGCONFIG: True
remote: /tmp/H5closevpxwstk_.c:1:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
remote: main (int argc, char **argv) {
remote: ^~~~
remote: /tmp/H5closevpxwstk_.c: In function ‘main’:
remote: /tmp/H5closevpxwstk_.c:2:5: warning: implicit declaration of function ‘H5close’ [-Wimplicit-function-declaration]
remote: H5close();
remote: ^~~~~~~
remote: /usr/bin/ld: cannot find -lhdf5
remote: collect2: error: ld returned 1 exit status
remote: .. ERROR:: Could not find a local HDF5 installation.
remote: You may need to explicitly state where your local HDF5 headers and
remote: library can be found by setting the HDF5_DIR environment
remote: variable or by using the --hdf5 command-line option.
remote:
remote: ----------------------------------------
remote: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-k24wiesz/tables/
remote: ! Push rejected, failed to compile Python app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to fierce-basin-65098.
remote:
To https://git.heroku.com/fierce-basin-65098.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/fierce-basin-65098.git'

Heroku Failed To Build -Node

i'm trying to host my website through heroku, but the build is failing constantly whatever i do.The build works locally, but when i tried to push to heroku i keep getting this
Counting objects: 1324, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (609/609), done.
Writing objects: 100% (1324/1324), 28.24 MiB | 0 bytes/s, done.
Total 1324 (delta 681), reused 1324 (delta 681)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Node.js app detected
remote:
remote: -----> Creating runtime environment
remote:
remote: NPM_CONFIG_LOGLEVEL=error
remote: NODE_VERBOSE=false
remote: NODE_ENV=production
remote: NODE_MODULES_CACHE=true
remote:
remote: -----> Installing binaries
remote: engines.node (package.json): ^10.7
remote: engines.npm (package.json): unspecified (use default)
remote: engines.yarn (package.json): ^1.5
remote:
remote: Resolving node version ^10.7...
remote: Downloading and installing node 10.9.0...
remote: Using default npm version: 6.2.0
remote: Resolving yarn version ^1.5...
remote: Downloading and installing yarn (1.9.4)...
remote: Installed yarn 1.9.4
remote:
remote: -----> Restoring cache
remote: Skipping cache restore (not-found)
remote:
remote: -----> Building dependencies
remote: Installing node modules (yarn.lock)
remote: yarn install v1.9.4
remote: [1/4] Resolving packages...
remote: [2/4] Fetching packages...
remote: warning Pattern ["#types/koa#latest"] is trying to unpack in the same destination "/tmp/yarncache.80EhH/v2/npm-#types/koa-2.0.46-24bc3cd405d10fcde81f876cd8285
b44d4ddc3e9" as pattern ["#types/koa#*","#types/koa#*","#types/koa#*","#types/koa#*","#types/koa#*","#types/koa#*","#types/koa#*","#types/koa#*","#types/koa#*"]. This could
result in non-deterministic behavior, skipping.
remote: warning Pattern ["#types/node#latest"] is trying to unpack in the same destination "/tmp/yarncache.80EhH/v2/npm-#types/node-10.9.2-f0ab8dced5cd6c56b26765e1c0d
9e4fdcc9f2a00" as pattern ["#types/node#*","#types/node#*","#types/node#*","#types/node#*","#types/node#*","#types/node#*","#types/node#*","#types/node#*","#types/node#*","#
types/node#*","#types/node#*","#types/node#*","#types/node#*","#types/node#*","#types/node#*"]. This could result in non-deterministic behavior, skipping.
remote: warning Pattern ["koa-convert#latest"] is trying to unpack in the same destination "/tmp/yarncache.80EhH/v2/npm-koa-convert-1.2.0-da40875df49de0539098d1700b50
820cebcd21d0" as pattern ["koa-convert#^1.2.0"]. This could result in non-deterministic behavior, skipping.
remote: warning Pattern ["qs#latest"] is trying to unpack in the same destination "/tmp/yarncache.80EhH/v2/npm-qs-6.5.2-cb3ae806e8740444584ef154ce8ee98d403f3e36" as p
attern ["qs#^6.4.0"]. This could result in non-deterministic behavior, skipping.
remote: (node:257) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or
Buffer.from() methods instead.
remote: [1/4] Resolving packages...
remote: [2/4] Fetching packages...
remote: error An unexpected error occurred: "ENOENT: no such file or directory, scandir '/tmp/yarncache.80EhH/v2/npm-path-key-2.0.1-411cadb574c5a140d3a4b1910d40d80cc9
f40b40'".
remote: info If you think this is a bug, please open a bug report with the information provided in "/tmp/build_11ee5794ef73ae92c415ea71c412314f/yarn-error.log".
remote: info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
remote:
remote: -----> Build failed
remote:
remote: We're sorry this build is failing! You can troubleshoot common issues here:
remote: https://devcenter.heroku.com/articles/troubleshooting-node-deploys
remote:
remote: If you're stuck, please submit a ticket so we can help:
remote: https://help.heroku.com/
remote:
remote: Love,
remote: Heroku
remote:
remote: ! Push rejected, failed to compile Node.js app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to sun-it-solution.
remote:
To https://git.heroku.com/sun-it-solution.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/sun-it-solution.git'
i also tried to run yarn cache clean, removing all node_modules and run yarn install , but still the build fails
i'm stuck here :( i googled some other things too but i cant solve the problem please help

Resources