You are not logged in.

#1 2018-08-23 20:12:09

mark-o-solo
Member
Registered: 2012-03-19
Posts: 77

Python update conflicts after package installation w/o pacman [SOLVED]

Hello everyone,

I installed a whole array of python packages through pip and conda as tensorflow-gpu and some other packages arounf it did not seem to available  up to date and/or version compatible from arch repos and AUR. My problem is now that I cannot seem to update my system as seemingly all python packages give me conflicts "exists in filesystem".

Is there a way to selectively update only those packages where a newer version is available through pacman and ignore those where the installed version is higher ?

Alternatively, are there forseeable problems if I were to make pacman ignore all python packages and update them separately through pip ?

Thanks

Last edited by mark-o-solo (2018-09-03 14:51:27)

Offline

#2 2018-08-23 20:32:51

headkase
Member
Registered: 2011-12-06
Posts: 2,004

Re: Python update conflicts after package installation w/o pacman [SOLVED]

It won't help much now, but once you have your system back in order look into Python Virtual Environments:

https://docs.python-guide.org/dev/virtualenvs/

Those let you install packages in a folder inside your home folder and they don't touch your system so they don't break it.

As a rule never use pip for system-wide installations in Python.  You will end up with, as you have, untracked files in your filesystem and that will eventually break things as you've found out.

I'll let someone else chime in on how to repair your system, my point is for once it's repaired.

Edit: and if you need it installed install Python VirtualEnv with pacman.

Last edited by headkase (2018-08-23 20:34:29)

Offline

#3 2018-08-23 20:38:36

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: Python update conflicts after package installation w/o pacman [SOLVED]

https://wiki.archlinux.org/index.php/Py … management

If you must use pip, use a virtual environment, or pip install --user to avoid conflicts with packages in /usr. It is always preferred to use pacman to install software.

Note: There are also tools integrating pip with pacman by automatically generating PKGBUILDs for specified pip-packages: see Creating packages#PKGBUILD generators.
Tip: pipenv provides a single CLI for Pipfile, pip and virtualenv. It is available as python-pipenv and python2-pipenv.

Unless you want to end up in an administration nightmare, I suggest you un-pip your pipping and re-pip it according to the wiki, or you might pip your system in a state beyond pipping. In case you're wondering, any other language specific package management that taints /usr will open similar gates to administrator hell. At least it's warm there.

Offline

#4 2018-08-23 20:41:29

mark-o-solo
Member
Registered: 2012-03-19
Posts: 77

Re: Python update conflicts after package installation w/o pacman [SOLVED]

Haha, how poetic
Not to worry, I do intend to go back to pacman packages as soon as possible, Im just not sure how to proceed. Thats why I wanted to revert python packages selectively according to their version into pacmans hands, and keep only the ones not yet available from repos pipped

Offline

#5 2018-08-23 20:59:50

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: Python update conflicts after package installation w/o pacman [SOLVED]

Make a list, un-pip them all, install them through pacman and then use virtualenv.

Offline

#6 2018-08-23 23:12:38

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: Python update conflicts after package installation w/o pacman [SOLVED]

Use the "lostfiles" package to detect files pacman does not know about, then remove them or migrate them to a virtualenv.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#7 2018-09-03 14:50:52

mark-o-solo
Member
Registered: 2012-03-19
Posts: 77

Re: Python update conflicts after package installation w/o pacman [SOLVED]

It has been solved by un-pipping all packages and reinstalling from arch repos. The version conflict that pushed me to pip has been fixed.
Thanks !

Offline

Board footer

Powered by FluxBB