点冻结不显示软件包

时间:2019-08-19 11:56:37

标签: python python-3.x opencv ubuntu pip

由于某些原因,我看不到通过pip冻结进行的opencv打印,但是我可以导入它。

pip freeze | grep opencv
pip3 freeze | grep opencv

python -c "import cv2; print(cv2.__file__)"
/usr/local/lib/python3.6/dist-packages/cv2.cpython-36m-x86_64-linux-gnu.so
python -c "import cv2; print(cv2.__version__)"
3.4.2

python3 -c "import cv2; print(cv2.__file__)"
/usr/local/lib/python3.6/dist-packages/cv2.cpython-36m-x86_64-linux-gnu.so
python3 -c "import cv2; print(cv2.__version__)"
3.4.2

python -V
Python 3.6.8

python3 -V
Python 3.6.8

pip -V
pip 9.0.1 from /usr/lib/python3/dist-packages (python 3.6)

pip3 -V
pip 9.0.1 from /usr/lib/python3/dist-packages (python 3.6)

我在bashrc中有python3的别名:

cat ~/.bashrc | tail
alias python=python3
alias pip=pip3

Ubuntu版本:

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.2 LTS
Release:    18.04
Codename:   bionic

1 个答案:

答案 0 :(得分:1)

通过pip冻结软件包时,它将显示pip安装的软件包,而opencv可能无法通过pip安装。