skip to Main Content

Im deploying my first project using Django on heroku. I have stuck in a error:

remote: -----> Installing python-3.8.5
remote: -----> Installing pip 20.1.1, setuptools 47.1.1 and wheel 0.34.2
remote: -----> Installing SQLite3
remote: -----> Installing requirements with pip
remote:        Collecting appdirs==1.4.3
remote:          Downloading appdirs-1.4.3-py2.py3-none-any.whl (12 kB)
remote:        ERROR: Could not find a version that satisfies the requirement apt-xapian-index==0.49 (from -r /tmp/build_4d208449/requirements.txt (line 2)) (from versions: none)
remote:        ERROR: No matching distribution found for apt-xapian-index==0.49 (from -r /tmp/build_4d208449/requirements.txt (line 2))
remote:  !     Push rejected, failed to compile Python app.
remote: 
remote:  !     Push failed
remote:  !
remote:  ! ## Warning - The same version of this code has already been built: b6448ab5f99718f2452407bed32ed667b2e2c8d6
remote:  !
remote:  ! We have detected that you have triggered a build from source code with version b6448ab5f99718f2452407bed32ed667b2e2c8d6
remote:  ! at least twice. One common cause of this behavior is attempting to deploy code from a different branch.
remote:  !
remote:  ! If you are developing on a branch and deploying via git you must run:
remote:  !
remote:  !     git push heroku <branchname>:main
remote:  !
remote:  ! This article goes into details on the behavior:
remote:  !   https://devcenter.heroku.com/articles/duplicate-build-version
remote: 
remote: Verifying deploy...
remote: 
remote: !       Push rejected to todo-app04.
remote: 

The exact error is:

remote:        ERROR: Could not find a version that satisfies the requirement apt-xapian-index==0.49 (from -r /tmp/build_4d208449/requirements.txt (line 2)) (from versions: none)
remote:        ERROR: No matching distribution found for apt-xapian-index==0.49 (from -r /tmp/build_4d208449/requirements.txt (line 2))
remote:  !     Push rejected, failed to compile Python app.

I dont know why that happens.

This is requirements.txt:

appdirs==1.4.3
apt-xapian-index==0.49
arrow==0.17.0
asgiref==3.3.1
attrs==20.3.0
base58==2.0.1
bcrypt==3.1.7
beautifulsoup4==4.9.3
bitcoinrpc==0.3.1
blinker==1.4
bs4==0.0.1
certifi==2019.11.28
chardet==3.0.4
click==6.6
colorama==0.4.3
command-not-found==0.3
cryptography==2.8
cupshelpers==1.0
dbus-python==1.2.16
defer==1.0.6
distlib==0.3.0
distro==1.4.0
distro-info===0.23ubuntu1
Django==3.1.4
django-bitcoin==0.2
django-json-rpc==0.7.2
docker-py==1.8.0
ecdsa==0.16.1
entrypoints==0.3
filelock==3.0.12
flake8==3.8.4
funcsigs==1.0.2
future==0.18.2
galternatives==1.0.6
gpg===1.13.1-unknown
gunicorn==20.0.4
h11==0.12.0
httpcore==0.12.2
httplib2==0.14.0
httpx==0.16.1
idna==2.8
importlib-metadata==1.5.0
iniconfig==1.1.1
Jinja2==2.10.1
json-rpc==1.13.0
jsonrpcclient==2.0.1
jsonrpcserver==3.1.1
jsonschema==3.2.0
keyring==18.0.1
language-selector==0.1
launchpadlib==1.10.13
lazr.restfulclient==0.14.2
lazr.uri==1.0.3
lubuntu-update-notifier==0.1
MarkupSafe==1.1.0
mccabe==0.6.1
mnemonic==0.13
more-itertools==4.2.0
netifaces==0.10.4
oauthlib==3.1.0
olefile==0.46
orjson==3.4.6
packaging==20.8
path==15.0.1
path.py==12.5.0
pbkdf2==1.3
pexpect==4.6.0
Pillow==7.0.0
pluggy==0.13.1
protobuf==3.0.0a3
proton-client==0.2.0
protonvpn-cli==3.2.1
protonvpn-nm-lib==0.3.0
py==1.10.0
pyaes==1.6.1
pycairo==1.16.2
pycodestyle==2.6.0
pycryptodome==3.9.9
pycups==1.9.73
pyflakes==2.2.0
PyGObject==3.36.0
PyJWT==1.7.1
pymacaroons==0.13.0
PyNaCl==1.3.0
pyOpenSSL==19.0.0
pyparsing==2.4.7
PyQt5==5.14.1
pyrsistent==0.17.3
PySocks==1.6.8
pytest==6.2.1
python-apt==2.0.0+ubuntu0.20.4.4
python-dateutil==2.8.1
python-debian===0.1.36ubuntu1
python-gnupg==0.4.5
pythondialog==3.4.0
pytz==2020.5
pywallet==0.1.0
pyxdg==0.26
PyYAML==5.3.1
qrcode==6.1
reportlab==3.5.34
requests==2.11.1
requests-unixsocket==0.2.0
rfc3986==1.4.0
SecretStorage==2.3.1
sha256==0.1
simplejson==3.16.0
sip==4.19.21
six==1.14.0
sniffio==1.2.0
soupsieve==2.2
sqlparse==0.4.1
systemd-python==234
tabulate==0.8.7
toml==0.10.2
torbrowser-launcher==0.3.2
two1==3.10.9
typing-extensions==3.7.4.3
ubuntu-advantage-tools==20.3
ubuntu-drivers-common==0.0.0
ufw==0.36
unattended-upgrades==0.1
urllib3==1.25.8
usb-creator==0.3.7
virtualenv==20.0.17
wadllib==1.3.3
websocket-client==0.57.0
whitenoise==5.2.0
xkit==0.0.0
zipp==1.0.0

I have install the: apt-xapian-index in my pc using: sudo apt-get install apt-xapian-index, but still shows the same error.
Any answer would be helpful

2

Answers


  1. apt-xapian-index is not a Python package on the Python Package Index (PyPI) installed via pip, but a Debian/Ubuntu package (installed via apt-get). You cannot put that package in your requirements.txt file because that file is only for Python packages.

    You might be able to use a package like xapian-bindings from pip, but Heroku might not let you compile bindings out of the box without some more configuration.

    Login or Signup to reply.
  2. Remove apt-xapian-index==0.49 from requirements.txt else your Python dependency installation attempt will fail. (It will try to look up the package on http://pypi.org/ which does not exist there.)

    Add a second buildpack: https://github.com/heroku/heroku-buildpack-apt

    Create an Aptfile with the content apt-xapian-index.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search