This article mainly introduces to you the solution to the problem of module package version conflict in installation in python. The article introduces the cause and solution of the problem. Friends who need it You can use it as a reference, let’s take a look below.
Problem
#I recently encountered a problem at work. When installing python software packages, I often encounter something like this one question. For example, for ipython, the version installed on the machine itself is 1.2.1, which is obviously too low to run jupyter. I tried to install it using pip, but found that the download process went smoothly, but such an error always occurred during installation.
The error message is as follows:
......'Not uninstalling ipython at /usr/lib/python2.7/dist-packages, owned by OS'......
Finally, it shows that ipython has been successfully installed, but when I check the version, it is still 1.2.1, which makes me very confused.
Cause
#After some research, I found that the cause of this problem is actually very simple, it’s because of ubuntu’s apt-get The version conflicts with the version installed by pip. Since the 'status' of apt-get is slightly higher than that of pip (after all, it's your real father), the system will give priority to using the software packages in apt-get. However, the software in apt-get is usually very old and cannot keep up with the update speed of python packages. Although pip has a new version, it cannot be delete## Older version of #apt-get. . . . . . This caused the problem of being unable to uninstall mentioned in the error.
Solution
Summary
【Related recommendations】
2. Python meets data collection video tutorial
3. Python basic introductory tutorial
The above is the detailed content of Solution to conflicts when installing module packages. For more information, please follow other related articles on the PHP Chinese website!