OpenCV Support

AIM:
I am using caffe.
I am trying to run program on tx2 as on my x64 computer.
I always check out version between them and it indeed help me a lot.
I think this maybe because the version about opencv or cv2 module.
However I don’t know how to change my cv2 module version on TX2.
If you need more environment information, please reply me.

Environment:
example:
import cv2
print cv2.version

DEVICE:     TX2
python      2.7

python modle:
matplotlib  2.2.2
pylab       1.11.0
cv2         2.4.13

JetPack:     3.0       (more info: https://developer.nvidia.com/embedded/jetpack-3_0)

moreinfo:
when I tried

sudo apt-get install libopencv-dev

error:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libopencv-dev : Depends: libopencv-core-dev (= 2.4.9.1+dfsg-1.5ubuntu1.1)
                 Depends: libopencv-ml-dev (= 2.4.9.1+dfsg-1.5ubuntu1.1)
                 Depends: libopencv-imgproc-dev (= 2.4.9.1+dfsg-1.5ubuntu1.1)
                 Depends: libopencv-video-dev (= 2.4.9.1+dfsg-1.5ubuntu1.1)
                 Depends: libopencv-objdetect-dev (= 2.4.9.1+dfsg-1.5ubuntu1.1)
                 Depends: libopencv-highgui-dev (= 2.4.9.1+dfsg-1.5ubuntu1.1)
                 Depends: libopencv-calib3d-dev (= 2.4.9.1+dfsg-1.5ubuntu1.1)
                 Depends: libopencv-flann-dev (= 2.4.9.1+dfsg-1.5ubuntu1.1)
                 Depends: libopencv-features2d-dev (= 2.4.9.1+dfsg-1.5ubuntu1.1)
                 Depends: libopencv-legacy-dev (= 2.4.9.1+dfsg-1.5ubuntu1.1)
                 Depends: libopencv-contrib-dev (= 2.4.9.1+dfsg-1.5ubuntu1.1)
                 Depends: libopencv-ts-dev (= 2.4.9.1+dfsg-1.5ubuntu1.1)
                 Depends: libopencv-photo-dev (= 2.4.9.1+dfsg-1.5ubuntu1.1)
                 Depends: libopencv-videostab-dev (= 2.4.9.1+dfsg-1.5ubuntu1.1)
                 Depends: libopencv-stitching-dev (= 2.4.9.1+dfsg-1.5ubuntu1.1)
                 Depends: libopencv-gpu-dev (= 2.4.9.1+dfsg-1.5ubuntu1.1)
                 Depends: libopencv-superres-dev (= 2.4.9.1+dfsg-1.5ubuntu1.1)
                 Depends: libopencv-ocl-dev (= 2.4.9.1+dfsg-1.5ubuntu1.1) but it is not going to be installed
                 Depends: libopencv2.4-java (= 2.4.9.1+dfsg-1.5ubuntu1.1) but it is not going to be installed
                 Depends: libopencv2.4-jni (= 2.4.9.1+dfsg-1.5ubuntu1.1) but it is not going to be installed
                 Depends: libcv-dev (= 2.4.9.1+dfsg-1.5ubuntu1.1)
                 Depends: libhighgui-dev (= 2.4.9.1+dfsg-1.5ubuntu1.1)
                 Depends: libcvaux-dev (= 2.4.9.1+dfsg-1.5ubuntu1.1)
E: Unable to correct problems, you have held broken packages.

I learn that if I install JetPack I cannot change opencv as this way:

sudo apt-get install libopencv-dev

, right?

then when I try to

import cv2

in python. I meet error:

No module named cv2

so I search an anwser and do it as follow:

sudo apt-get install libopencv4tegra-python
sudo apt-get install opencv-python

and

libopencv4tegra-python:  2.4.13-17-g5317135

When I try this code:

pkg-config opencv --modversion

TX2 DEVICE:

2.4.13

my x64 computer DEVICE

2.4.9.1

When I try this code in python:

import cv2
print cv2.__version

TX2 DEVICE:

2.4.13

my x64 computer DEVICE

3.4.3

When I run under code:

rectmap = {}
imgid=0

imgdir= datadir+'666.jpg'
img = load_img(imgdir)
imgdata = img[:,:,[2,1,0]]*255. - mn

all_rect = []
sys.stdout.flush()
work(imgdata, all_rect)
rectmap[imgid] = all_rect
result_annos = anno_func.get_refine_rects(annos, rectmap)
print result_annos['imgs'].keys()
print result_annos['imgs'][imgid]

imgdata_draw = anno_func.draw_all(result_annos,datadir,imgid,img)    
pl.figure(figsize=(20,20)) 
pl.imshow(imgdata_draw)

There is error:

Traceback (most recent call last)
<ipython-input-10-5e956b4ea70a> in <module>()
      8 all_rect = []
      9 sys.stdout.flush()
---> 10 work(imgdata, all_rect)
     11 rectmap[imgid] = all_rect
     12 result_annos = anno_func.get_refine_rects(annos, rectmap)

<ipython-input-8-46f307e2a988> in work(imgdata, all_rect)
     42             data = cv2.resize(imgdata, (data_layer.shape[2], data_layer.shape[3]))
     43         else:
---> 44             data = cv2.resize(imgdata, (imgdata.shape[0]*resize, imgdata.shape[1]*resize))
     45         data = data.transpose(2,0,1)
     46         #print data.shape

error: /hdd/buildbot/slave_jetson_tx_3/35-O4T-L4T-R24/opencv/modules/python/src2/cv2.cpp:201: error: (-2) The numpy array of typenum=12, ndims=3 can not be created in function allocate

I will appreciate it if you can give me some suggestion !

Another:

I use jupyter notebook.
install by this way:
sudo pip install jupyter 4.4.0
sudo pip install notebook
sudo pip install qtconsole
forget how to install ipython 5.8.0