Debian multiarch: unable to install python for both armhf and amd64 - python

For a project I am working on I am using Debian (8) as base OS. The target I am developing for is an ARM based platform. So for easy cross compiling I am using the multiarch functionality that debian provides.
Unfortunately I run into an issue when I try to install python for both my host system and the system I am cross compiling for. It looks like they cannot be installed next to each other.
When I try to install python for both architectures using apt-get install (apt-get install python python:armhf), I get this error:
Reading package lists... Done
Building dependency tree... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
python : Depends: python2.7 (>= 2.7.9-1~) but it is not going to be installed
PreDepends: python-minimal (= 2.7.9-1) but it is not going to be installed
Conflicts: python:armhf but 2.7.9-1 is to be installed
python:armhf : Conflicts: python but 2.7.9-1 is to be installed
If I first install python for my host system and then try to install python for armhf, apt wants to remove the first python installation again.
Anybody seen this before? Any idea how to solve this?

Multiarch as of Debian Jessie does not allow the parallel installation of executables:
The package python contains executables that are installed to /usr/bin (e.g. pdb, pydoc, ...)
The package python:armhf also contains those executables and they should also get installed to /usr/bin.
Therefore python and python:armhf can not be installed at the same time since the executables of one package would overwrite the executable of the other package.
The good thing is, that you do not need two python interpreters. In your case I would just install the python interpreter that is needed for the host architecture (e.g. python:amd64). Please note that the installation of build dependencies with a command such as sudo apt-get build-dep -a armhf PACKAGE-NAME might sometimes fail and you have to guess what packages need to be installed manually.

Related

How to install a specific version of libpython on linux

Prefix: I am currently working with some legacy machines in the field and need to install specific versions of libpython. These machines do not have access to the internet so apt-get or pip is not an option. These machines are currently running Ubuntu 16.
I am not entirely sure what libpython even is BUT I was able to install it with sudo apt-get install libpython3.6-dev on my personal machine. However, there is a very high probability that I will need a specific version.
Question: How do I install a specific version of libpython so that the Shared Objects (.so) and head (.a) files are created properly?
Here are the files that were created via my 3.6 install:
/usr/lib/python3.6/config-3.6m-i386-linux-gnu/libpython3.6.so
/usr/lib/python3.6/config-3.6m-i386-linux-gnu/libpython3.6m.so
/usr/lib/python3.6/config-3.6m-i386-linux-gnu/libpython3.6m.a
/usr/lib/python3.6/config-3.6m-i386-linux-gnu/libpython3.6m-pic.a
More Info:
There is a proprietary install .deb that is firing off these errors saying the following:
dpkg: dependency problems prevent configuration of [Program Name]:
[Program Name] depends on libpython3.6 (>= 3.6.5); however:
Package libpython3.6 is not installed.

nodejs ask python-minimal that no longer use on python2

i use linux
nodejs had no problem untill i upgraded my system (sudo apt upgrade)
now when i try to install nodejs it say python-minimal mot installed
then i knew that it casue of updating python from python2.7.17 to python2.7.18 and python minimal is no longer require ,but now i cant install nodejs cause it ask for python-minimal
can any one help me
the problem is when i want to install nodejs 15 or 14
but when i install nodejs 12 or lower it have no problem
this is what it say after i write (sudo apt install nodejs)
sudo apt upgrade nodejs
[sudo] password for julian:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libnode72 : Conflicts: nodejs-legacy
nodejs : Depends: python-minimal but it is not installable
E: Broken packages
This
sudo apt remove libnode72:amd64
sudo apt autoclean
sudo apt autoremove
should do the job.
I encountered this issue today after going from Ubuntu 18.04 to Ubuntu 20.04 and there are a lot of old Ask Ubuntu questions surrounding this and Github questions where for one reason or another various apps (Node included) rely on core Python functions that are leveraged from the python-minimal library.
For better or worse it also doesn't seem to care if Python is installed or not in it's entirety. It wants the minimal package specifically.
The thing is all the python-minimal repositories are marked OldStable (about OldStable if you want to know)and rely on Python 2 which has been sunset.
It seems if you haven't upgraded your OS in a while there is something hanging out in the package manager that will tell you that node needs python minimal to be run or installed but this is not the case as is evident by the lack of package support.
The solution I found was after upgrade to simply rerun the installation for Node based on the package manager instructions for your operating system. In my case it was specifically Dedbian and Ubuntu based distributions.

Deploy PyQt5 applications on Linux

I recently wrote a small pyqt(python 3 and pyqt5) application for my biology class to simulate alleles fixation. I tried setuptools and indeed did produce a tarball package. However, I am not able to add PyQt5 as a dependency to my package possibly because it is no longer a package in PyPI. Consequently, when I install the program on another Linux PC, the program simply cannot execute because it is missing PyQt5 module. I tried this to add an official link in setup.py but it does not work either.
dependency_links = ['https://github.com/baoboa/pyqt5'],
I installed pyqt binding from my distribution's official repository so I thought about to write a dependencies resolver script but since most Linux distributions have different package managers and package names, it will not be very feasible.
Is there a way to get around this?
Thank you!
Link to the app: https://github.com/lorix-lpan/alleles-fixation
Installed python3-devel, python3-qt5, python3-setuptools, python3-sip (PCLinuxOS.)
Similar packages are available with the latest Fedora, Debian + the Debian clones (Ubuntu etc.)
( $ sudo apt-get install python3-all-dev pyqt5-dev python3-pyqt5 python3-setuptools python3-sip )
And : $ cd alleles-fixation/ && python3 setup.py build : No errors.

mac following brew install python warning thrown unstable state

Pundits warn against installing python in a mac usr/bin/Frameworks area.
Python self-installers write to Framework by default.
pundits advise using brew install of python to avoid the above.
Brew install python however, results in unstable state
Idle reports tclsh mismatch.
Pundits advise active state installer of correct tclsh. These are high-level python cognoscenti, and real pundits, lilies amidst the thorns.
Active-state installs to Frameworks (can you imagine?).
The said installer allows no other installation directory.
Brew installed python fails to see the active-state tclsh.
However, if one of you admonitory pundits could help me with a logical, non-idiomatic description of a process that will associate the appropriate "tclsh" in usr/bin with python3 in usr/local/bin, I would be ecstatic.
Homebrew's Python build will only attempt to recognize brewed or system Tcl/Tk. To build against Homebrew's Tcl/Tk (and install it first if necessary), install Python with brew install python3 --with-tcl-tk.

"command-not-found==0.2.44" in pip's freeze

The output of pip freeze on my machine has included the following odd line:
command-not-found==0.2.44
When trying to install requirements on a different machine, I got the obvious No distributions at all found for command-not-found==0.2.44. Is this a pip bug? Or is there any real python package of that name, one which does not exist in pypi?
Indeed, as mentioned in the follow up comments, Ubuntu has a python package, installed via dpkg/apt that is called "python-commandnotfound"
$apt-cache search command-not-found
command-not-found - Suggest installation of packages in interactive bash sessions
command-not-found-data - Set of data files for command-not-found.
python-commandnotfound - Python 2 bindings for command-not-found.
python3-commandnotfound - Python 3 bindings for command-not-found.
As this is provided via apt, and not available in the pypi repo, you won't be able to install it via pip, but pip will see that it is installed. For the purposes of showing installed packages, pip doesn't care if a package is installed via apt, easy_install, pip, manually, etc.
In short, if you actually need it on another host (which I assume you don't) you'll need to apt-get install python-commandnotfound.

Categories

Resources