diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1509d8cf169e5ad7634d08ad6d94019c6844d6d2..64f850583b6eadbbfdffcbabeac1ad5eb4c4df08 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -73,8 +73,12 @@ if(${OpenCV_VERSION} VERSION_LESS 2.3.1)
 endif()
 
 if(BGS_PYTHON_SUPPORT)
-	#set(Boost_USE_STATIC_LIBS OFF)
-	set(Boost_USE_STATIC_LIBS ON)
+	if(WIN32)
+		set(Boost_USE_STATIC_LIBS ON)
+	else()
+		set(Boost_USE_STATIC_LIBS OFF)
+	endif()
+	
 	set(Boost_USE_MULTITHREADED ON)
 	set(Boost_USE_STATIC_RUNTIME OFF)
 	
@@ -97,7 +101,7 @@ if(BGS_PYTHON_SUPPORT)
 	if(NOT NUMPY_INCLUDE_DIR)
 		# message(FATAL_ERROR "You must define NUMPY_INCLUDE_DIR by 'cmake -D NUMPY_INCLUDE_DIR=/python/lib/site-packages/numpy/core/include ..'")
 		exec_program ("${PYTHON_EXECUTABLE}"
-			ARGS "-c \"import numpy; print numpy.get_include()\""
+			ARGS "-c \"import numpy; print(numpy.get_include())\""
 			OUTPUT_VARIABLE NUMPY_INCLUDE_DIR
 			RETURN_VALUE NUMPY_NOT_FOUND)
 	endif()
diff --git a/Demo.py b/Demo.py
index d5ebee1caa5b3e73e85c04316387224a028663fa..efa64cc1a60de50e2b34a91dc879d5e5265446d0 100644
--- a/Demo.py
+++ b/Demo.py
@@ -53,7 +53,7 @@ capture = cv2.VideoCapture(video_file)
 while not capture.isOpened():
 	capture = cv2.VideoCapture(video_file)
 	cv2.waitKey(1000)
-	print "Wait for the header"
+	print("Wait for the header")
 
 #pos_frame = capture.get(cv2.cv.CV_CAP_PROP_POS_FRAMES)
 #pos_frame = capture.get(cv2.CV_CAP_PROP_POS_FRAMES)