Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3.6 is not supported #56

Open
ardeal opened this issue Feb 21, 2019 · 0 comments
Open

Python 3.6 is not supported #56

ardeal opened this issue Feb 21, 2019 · 0 comments

Comments

@ardeal
Copy link

ardeal commented Feb 21, 2019

Hi,

If I build caffe(https://github.com/BVLC/caffe) on windows 10 64 bit, there is error.
Here are my settings:
Python 3.6.8
Visual Studio 15 2017 Win64
the following code in the cmake file(https://github.com/BVLC/caffe/blob/windows/cmake/WindowsDownloadPrebuiltDependencies.cmake) shows that Python3.6 is not supported.

Could you tell me how to add Python3.6 support?

`set(DEPENDENCIES_VERSION 1.1.0)
set(DEPENDENCIES_NAME_1800_27 libraries_v120_x64_py27_${DEPENDENCIES_VERSION})
set(DEPENDENCIES_NAME_1900_27 libraries_v140_x64_py27_${DEPENDENCIES_VERSION})
set(DEPENDENCIES_NAME_1900_35 libraries_v140_x64_py35_${DEPENDENCIES_VERSION})

set(DEPENDENCIES_URL_BASE https://github.com/willyd/caffe-builder/releases/download)
set(DEPENDENCIES_FILE_EXT .tar.bz2)
set(DEPENDENCIES_URL_1800_27 "${DEPENDENCIES_URL_BASE}/v${DEPENDENCIES_VERSION}/${DEPENDENCIES_NAME_1800_27}${DEPENDENCIES_FILE_EXT}")
set(DEPENDENCIES_SHA_1800_27 "ba833d86d19b162a04d68b09b06df5e0dad947d4")
set(DEPENDENCIES_URL_1900_27 "${DEPENDENCIES_URL_BASE}/v${DEPENDENCIES_VERSION}/${DEPENDENCIES_NAME_1900_27}${DEPENDENCIES_FILE_EXT}")
set(DEPENDENCIES_SHA_1900_27 "17eecb095bd3b0774a87a38624a77ce35e497cd2")
set(DEPENDENCIES_URL_1900_35 "${DEPENDENCIES_URL_BASE}/v${DEPENDENCIES_VERSION}/${DEPENDENCIES_NAME_1900_35}${DEPENDENCIES_FILE_EXT}")
set(DEPENDENCIES_SHA_1900_35 "f060403fd1a7448d866d27c0e5b7dced39c0a607")

message(STATUS "------------------------------------------${DEPENDENCIES_URL_1900_35}")

caffe_option(USE_PREBUILT_DEPENDENCIES "Download and use the prebuilt dependencies" ON IF MSVC)
if(MSVC)
file(TO_CMAKE_PATH $ENV{USERPROFILE} USERPROFILE_DIR)
if(NOT EXISTS ${USERPROFILE_DIR})
message(FATAL_ERROR "Could not find %USERPROFILE% directory. Please specify an alternate CAFFE_DEPENDENCIES_ROOT_DIR")
endif()
set(CAFFE_DEPENDENCIES_ROOT_DIR ${USERPROFILE_DIR}/.caffe/dependencies CACHE PATH "Prebuild depdendencies root directory")
set(CAFFE_DEPENDENCIES_DOWNLOAD_DIR ${CAFFE_DEPENDENCIES_ROOT_DIR}/download CACHE PATH "Download directory for prebuilt dependencies")
endif()
if(USE_PREBUILT_DEPENDENCIES)
# Determine the python version
if(BUILD_python)
if(NOT PYTHONINTERP_FOUND)
if(NOT "${python_version}" VERSION_LESS "3.0.0")
message(STATUS "---------------------------------------------------python_version == ${python_version}")
find_package(PythonInterp 3.6)
else()
message(STATUS "---------------------------------------------------python_version == ${python_version}")
find_package(PythonInterp 2.7)
endif()
#set(Python_ADDITIONAL_VERSIONS 3.6.8)
#find_package(PythonInterp 3.6.8)
# find_package(Python3)
# find_package(Python3 COMPONENTS Interpreter Development)
find_package(Python3 COMPONENTS Interpreter Development)
#find_package(PythonInterp)
message(STATUS "--------------------------------PYTHON_VERSION_MAJOR == ${PYTHON_VERSION_MAJOR}")
message(STATUS "--------------------------------PYTHON_VERSION_MINOR == ${PYTHON_VERSION_MINOR}")

    endif()
	set(PYTHON_VERSION_MAJOR 3)
	set(PYTHON_VERSION_MINOR 6)
    set(_pyver ${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR})
else()
	message(STATUS "---------------------------------------------------BUILD_python == ${BUILD_python}")
    message(STATUS "Building without python. Prebuilt dependencies will default to Python 2.7")
    set(_pyver 27)
endif()
if(NOT DEFINED DEPENDENCIES_URL_${MSVC_VERSION}_${_pyver})
    message(FATAL_ERROR "Could not find url for MSVC version = ${MSVC_VERSION} and Python version = ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.")
endif()`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant