python: 自动安装缺失库文件

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/JNingWei/article/details/79758335

Method

通过一条指令即可完成:

os.system('所需指令')

Note:

  • os.system('所需指令')还可以完成许多其他任务,非常强大。
  • 可以将指令以字符串的形式喂进去,因此使用起来非常灵活。

Example

try:
    from tqdm import tqdm
except:
    import os
    os.system('sudo pip3 install tqdm')
    from tqdm import tqdm
展开阅读全文

请教,库文件缺失问题!

04-03

UBUNTU12.04 请教到底是那个目录下缺少来文件,谢谢!rn交叉编译环境:rnrn命令:arm-linux-gcc -lpthread -lrt cam2.cpp -o cam `pkg-config --libs --cflags opencv` rnrn错误:rnrn/mydrive/arm-linux-gcc/usr/local/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/../../../../arm-none-linux-gnueabi/bin/ld: warning: ../../lib/libopencv_core.so, needed by /mydrive/OpencvInstall/lib/libopencv_calib3d.so, not found (try using -rpath or -rpath-link)rn/mydrive/arm-linux-gcc/usr/local/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/../../../../arm-none-linux-gnueabi/bin/ld: warning: ../../lib/libopencv_imgproc.so, needed by /mydrive/OpencvInstall/lib/libopencv_calib3d.so, not found (try using -rpath or -rpath-link)rn/mydrive/arm-linux-gcc/usr/local/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/../../../../arm-none-linux-gnueabi/bin/ld: warning: ../../lib/libopencv_flann.so, needed by /mydrive/OpencvInstall/lib/libopencv_calib3d.so, not found (try using -rpath or -rpath-link)rn/mydrive/arm-linux-gcc/usr/local/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/../../../../arm-none-linux-gnueabi/bin/ld: warning: ../../lib/libopencv_highgui.so, needed by /mydrive/OpencvInstall/lib/libopencv_calib3d.so, not found (try using -rpath or -rpath-link)rn/mydrive/arm-linux-gcc/usr/local/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/../../../../arm-none-linux-gnueabi/bin/ld: warning: ../../lib/libopencv_features2d.so, needed by /mydrive/OpencvInstall/lib/libopencv_calib3d.so, not found (try using -rpath or -rpath-link)rn/mydrive/arm-linux-gcc/usr/local/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/../../../../arm-none-linux-gnueabi/bin/ld: warning: ../../lib/libopencv_calib3d.so, needed by /mydrive/OpencvInstall/lib/libopencv_contrib.so, not found (try using -rpath or -rpath-link)rn/mydrive/arm-linux-gcc/usr/local/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/../../../../arm-none-linux-gnueabi/bin/ld: warning: ../../lib/libopencv_ml.so, needed by /mydrive/OpencvInstall/lib/libopencv_contrib.so, not found (try using -rpath or -rpath-link)rn/mydrive/arm-linux-gcc/usr/local/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/../../../../arm-none-linux-gnueabi/bin/ld: warning: ../../lib/libopencv_video.so, needed by /mydrive/OpencvInstall/lib/libopencv_contrib.so, not found (try using -rpath or -rpath-link)rn/mydrive/arm-linux-gcc/usr/local/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/../../../../arm-none-linux-gnueabi/bin/ld: warning: ../../lib/libopencv_objdetect.so, needed by /mydrive/OpencvInstall/lib/libopencv_contrib.so, not found (try using -rpath or -rpath-link)rn/mydrive/arm-linux-gcc/usr/local/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/../../../../arm-none-linux-gnueabi/bin/ld: warning: ../../lib/libopencv_nonfree.so, needed by /mydrive/OpencvInstall/lib/libopencv_gpu.so, not found (try using -rpath or -rpath-link)rn/mydrive/arm-linux-gcc/usr/local/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/../../../../arm-none-linux-gnueabi/bin/ld: warning: ../../lib/libopencv_photo.so, needed by /mydrive/OpencvInstall/lib/libopencv_gpu.so, not found (try using -rpath or -rpath-link)rn/mydrive/arm-linux-gcc/usr/local/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/../../../../arm-none-linux-gnueabi/bin/ld: warning: ../../lib/libopencv_legacy.so, needed by /mydrive/OpencvInstall/lib/libopencv_gpu.so, not found (try using -rpath or -rpath-link)rn/mydrive/arm-linux-gcc/usr/local/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/../../../../arm-none-linux-gnueabi/bin/ld: warning: ../../lib/libopencv_gpu.so, needed by /mydrive/OpencvInstall/lib/libopencv_stitching.so, not found (try using -rpath or -rpath-link)rnqust@qust-Rev-1-0:~$ rn 论坛

没有更多推荐了,返回首页