How to replace apt package with pip package if it has dependencies?











up vote
0
down vote

favorite












I'd like to install a specific version of psutil:



$ sudo -H pip install psutil==5.4.2
Found existing installation: psutil 5.4.2
Cannot uninstall 'psutil'. It is a distutils installed project and
thus we cannot accurately determine which files belong to it which
would lead to only a partial uninstall.


... it looks like psutil was already installed with apt:



$ apt list --install | grep psutil
python-psutail/trusty,now ......


But if I try to remove it:



$ sudo apt-get remove python-psutil
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
gir1.2-keybinder-3.0 libkeybinder-3.0-0
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
python-psutil terminator
0 upgraded, 0 newly installed, 2 to remove and 38 not upgraded.
After this operation, 3,145 kB disk space will be freed.


I'd like like to keep terminator. I just want to upgrade psutil to a specific version (which apt likely doesn't provide).



Are virtual environments the only answer or is there some way to force psutil to managed by pip, and not apt.










share|improve this question
























  • Do you need the newer psutil across your entire computer or can you get by with it being usable only for your own user without being available to sudo or other programs on the system that run under different users?
    – Thomas Ward
    Nov 28 at 0:59















up vote
0
down vote

favorite












I'd like to install a specific version of psutil:



$ sudo -H pip install psutil==5.4.2
Found existing installation: psutil 5.4.2
Cannot uninstall 'psutil'. It is a distutils installed project and
thus we cannot accurately determine which files belong to it which
would lead to only a partial uninstall.


... it looks like psutil was already installed with apt:



$ apt list --install | grep psutil
python-psutail/trusty,now ......


But if I try to remove it:



$ sudo apt-get remove python-psutil
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
gir1.2-keybinder-3.0 libkeybinder-3.0-0
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
python-psutil terminator
0 upgraded, 0 newly installed, 2 to remove and 38 not upgraded.
After this operation, 3,145 kB disk space will be freed.


I'd like like to keep terminator. I just want to upgrade psutil to a specific version (which apt likely doesn't provide).



Are virtual environments the only answer or is there some way to force psutil to managed by pip, and not apt.










share|improve this question
























  • Do you need the newer psutil across your entire computer or can you get by with it being usable only for your own user without being available to sudo or other programs on the system that run under different users?
    – Thomas Ward
    Nov 28 at 0:59













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I'd like to install a specific version of psutil:



$ sudo -H pip install psutil==5.4.2
Found existing installation: psutil 5.4.2
Cannot uninstall 'psutil'. It is a distutils installed project and
thus we cannot accurately determine which files belong to it which
would lead to only a partial uninstall.


... it looks like psutil was already installed with apt:



$ apt list --install | grep psutil
python-psutail/trusty,now ......


But if I try to remove it:



$ sudo apt-get remove python-psutil
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
gir1.2-keybinder-3.0 libkeybinder-3.0-0
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
python-psutil terminator
0 upgraded, 0 newly installed, 2 to remove and 38 not upgraded.
After this operation, 3,145 kB disk space will be freed.


I'd like like to keep terminator. I just want to upgrade psutil to a specific version (which apt likely doesn't provide).



Are virtual environments the only answer or is there some way to force psutil to managed by pip, and not apt.










share|improve this question















I'd like to install a specific version of psutil:



$ sudo -H pip install psutil==5.4.2
Found existing installation: psutil 5.4.2
Cannot uninstall 'psutil'. It is a distutils installed project and
thus we cannot accurately determine which files belong to it which
would lead to only a partial uninstall.


... it looks like psutil was already installed with apt:



$ apt list --install | grep psutil
python-psutail/trusty,now ......


But if I try to remove it:



$ sudo apt-get remove python-psutil
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
gir1.2-keybinder-3.0 libkeybinder-3.0-0
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
python-psutil terminator
0 upgraded, 0 newly installed, 2 to remove and 38 not upgraded.
After this operation, 3,145 kB disk space will be freed.


I'd like like to keep terminator. I just want to upgrade psutil to a specific version (which apt likely doesn't provide).



Are virtual environments the only answer or is there some way to force psutil to managed by pip, and not apt.







apt python pip






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 28 at 0:48

























asked Nov 28 at 0:28









user48956

2431311




2431311












  • Do you need the newer psutil across your entire computer or can you get by with it being usable only for your own user without being available to sudo or other programs on the system that run under different users?
    – Thomas Ward
    Nov 28 at 0:59


















  • Do you need the newer psutil across your entire computer or can you get by with it being usable only for your own user without being available to sudo or other programs on the system that run under different users?
    – Thomas Ward
    Nov 28 at 0:59
















Do you need the newer psutil across your entire computer or can you get by with it being usable only for your own user without being available to sudo or other programs on the system that run under different users?
– Thomas Ward
Nov 28 at 0:59




Do you need the newer psutil across your entire computer or can you get by with it being usable only for your own user without being available to sudo or other programs on the system that run under different users?
– Thomas Ward
Nov 28 at 0:59















active

oldest

votes











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1096658%2fhow-to-replace-apt-package-with-pip-package-if-it-has-dependencies%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1096658%2fhow-to-replace-apt-package-with-pip-package-if-it-has-dependencies%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Mouse cursor on multiple screens with different PPI

Agildo Ribeiro

Sometime when accessing a menu: “Ubuntu 16.04 has experienced an internal error”