Why don't these apt-packages behave the same on Ubuntu and Heroku?
With the amazing help of @PadraicCunningham I managed to find the solution. The problem turned out to be that heroku-buildpack-apt installs things in a newly created folder /app/.apt/
which was not in the PYTHONPATH.
So I added the relevant folder to my PYTHONPATH on heroku as follows:
heroku config:add PYTHONPATH=/app/.apt/usr/lib/python2.7/dist-packages/
This solved the issue. Again a big thanks to PadraicCunningham for helping me to find this issue!
Why does APT keep saying the gcloud SDK doesnt exist?
Is the google cloud sdk in the $PATH?
type echo $PATH
If the sdk isn't in the path then it won't find it, it may be that your root user has a different path than the user you used to set up the sdk
hope that helps
Ansible apt task that both upgrades packages and removes unused packages
Ansible will not perform both actions in one step. In the example task from the question, the autoremove: yes
option will be ignored.
autoremove: yes
is only parsed in theinstall
andremove
methods (performed withapt-get
command)upgrade: safe
causes Ansible to runaptitude
command (and it doesn't have the--auto-remove
option at all (and on top of that it's not even considered in theupgrade
method)
How to install Python bindings originating from an apt package?
sudo apt-get install libzbar-dev
sudo pip install zbar
It is usually a -dev package that you are missing when you get those kind of errors, an easy way to find the package is apt-cache search
like below:
~$ apt-cache search zbar
libbarcode-zbar-perl - bar code scanner and decoder (Perl bindings)
libzbar-dev - bar code scanner and decoder (development)
libzbar0 - bar code scanner and decoder (library)
libzbargtk-dev - bar code scanner and decoder (GTK+ bindings development)
libzbargtk0 - bar code scanner and decoder (GTK+ bindings)
libzbarqt-dev - bar code scanner and decoder (Qt bindings development)
libzbarqt0 - bar code scanner and decoder (Qt bindings)
python-qrtools - high level library for reading and generating QR codes
python-zbar - bar code scanner and decoder (Python bindings)
python-zbarpygtk - bar code scanner and decoder (PyGTK bindings)
zbar-dbg - bar code scanner and decoder (debug)
zbar-tools - bar code scanner and decoder (utilities)
FWIW, the procedure I used to install was python-qrtools
,libzbar-dev
and finally pip install zbar
.
Related Topics
Read File with Timeout in Python
How to Push a Subprocess.Call() Output to Terminal and File
Ignore Case in Glob() on Linux
Move and Zoom a Tkinter Canvas with Mouse
Opening a Python Thread in a New Console Window
Using Python 32 Bit in 64Bit Platform
Command 'X86_64-Linux-Gnu-Gcc' Failed with Exit Status 1
Simulate Mouse Clicks on Python
Pip Is Not Working for Python 3.10 on Ubuntu
High Kernel CPU When Running Multiple Python Programs
Send Sigint in Python to Os.System
Importerror: No Module Named 'Pysqlite2'
"Valueerror: _Type_ 'V' Not Supported" Error After Installing Pyreadline