The difference between installing labelImg and conda pip under Ubuntu 16.04

Install labelImg under Ubuntu 16.04

git clone https://github.com/tzutalin/labelImg.git

installation steps

sudo apt-get install pyqt5-dev-tools
sudo pip3 install -r requirements/requirements-linux-python3.txt
make qt5py3

For the second step, it is recommended to use Tsinghua source separately to install fast

pyqt5==5.10.1
lxml==4.6.2

Tsinghuayuan

https://pypi.tuna.tsinghua.edu.cn/simple

No module named'libs.resources' error occurred during the installation and operation of LabelImg

Problem description: No module named'libs.resources' error appears when running python labelImg.py after installing anaconda under win7

Solution:

1. Run pyrcc5 -o resources.py resources.qrc

2. Copy the generated resources.py to the libs directory of the same level

OK The problem can be solved through the above two steps and the operation is successful.

The difference between conda and pip

conda

First of all, conda is a general-purpose package manager, which means that packages of any language can be managed with it, naturally including Python. When installing Anaconda or Miniconda, conda will be installed together. Among them, Anaconda, as the release version of Python, is equivalent to bringing common third-party libraries on the basis of Python, while Miniconda is equivalent to an installation program for conda environment, which only contains conda and its dependencies, which can reduce some problems. The installation of third-party libraries is required, so Miniconda occupies very little space.

pip

Pip, like conda, is also a package manager, and is officially recognized by Python. The meaning of pip is Pip Installs Packages. Most commonly used to install packages published on the Python Package Index (PyPI, Python Package Index https://pypi.python.org/pypi). Therefore, when conda listviewing the installed packages in the current environment through commands, the source through pip is pypi.

Insert picture description here

The difference between conda and pip installation library

In Anaconda, the matter in which environment , simply by conda install xxxway of installed libraries will be placed under the pkgs directory Anaconda, such as: E:\python\anaconda\pkgs\numpy-1.18.1-py36h48dd78f_1. The advantage of this is that when a library has been downloaded in a certain environment, and the library is needed in another environment, the library can be copied directly from the pkgs directory to the new environment (the library’s Lib\site-packagesCopy the files in the current new environment to the third-party library in Lib, that Lib\site-packagesis, the process is equivalent pip install xxxto installing through ) without repeated downloading.

The difference between conda and pip uninstall library

Pip installs the library in a specific environment , so uninstalling the library is the same, and pip uninstall xxxyou can Lib\site-packagesuninstall the corresponding library in the environment .

If you conda uninstall xxxdelete a library in the current environment, only the contents of the library in the site-packages directory in the current environment will be deleted, and its effect pip uninstall xxxis the same as the pass . If you conda install xxxdownload this library in another environment , you still need to copy the library in the pkgs directory to the current environment. If you want to clear the downloaded library under this pkgs, you can use commands conda clean -hto do so.

For other differences between conda and pip, please refer to Understanding Conda and Pip

Guess you like

Origin blog.csdn.net/ahelloyou/article/details/113989943
Recommended