Install into a virtual environment or using pyenv?
See original GitHub issueFirst off, I’m trying to install this on a Mac so I’m having to jump through four thousand different hoops to even get that working. So far I have been unsuccessful.
I think that part of the problem is that I am trying to install into a virtual environment, specifically one using pyenv. The problem with this seems to be that all of the Mac installation scripts seem to assume your python binary is located at python3.5
if you are using python version 3.5, or that your python was installed by homebrew. Is there any support for a different type of Python installation? I don’t know of a professional Python developer that doesn’t use virtual environments but I guess there must be some as I seem to be the first one reporting this issue.
-
OS and version used: macOS 10.13.15
-
Python runtime used: 3.5.5
Console output after running a modified build.sh
. The modifications were mostly just setting the correct python executable and version numbers in the script, and also removing the last few lines that try to run the example code
~/Desktop/azure-iot-sdk-python/c/cmake/iotsdk_mac ~/Desktop/azure-iot-sdk-python
-- The C compiler identification is AppleClang 9.1.0.9020039
-- The CXX compiler identification is AppleClang 9.1.0.9020039
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- IoT Client SDK Version = 1.2.5
-- Provisioning client OFF
-- Looking for include file stdint.h
-- Looking for include file stdint.h - found
-- Looking for include file stdbool.h
-- Looking for include file stdbool.h - found
-- target architecture: x86_64
-- Performing Test CXX_FLAG_CXX11
-- Performing Test CXX_FLAG_CXX11 - Success
-- Found PkgConfig: /usr/local/bin/pkg-config (found version "0.29.2")
-- Checking for module 'libcurl'
-- Found libcurl, version 7.49.1
-- Found CURL: curl
-- target architecture: x86_64
-- target architecture: x86_64
-- target architecture: x86_64
-- target architecture: x86_64
-- iothub architecture: x86_64
CMake Warning at /usr/local/Cellar/cmake/3.10.2/share/cmake/Modules/FindBoost.cmake:801 (message):
New Boost version may have incorrect or missing dependencies and imported
targets
Call Stack (most recent call first):
/usr/local/Cellar/cmake/3.10.2/share/cmake/Modules/FindBoost.cmake:907 (_Boost_COMPONENT_DEPENDENCIES)
/usr/local/Cellar/cmake/3.10.2/share/cmake/Modules/FindBoost.cmake:1542 (_Boost_MISSING_DEPENDENCIES)
/Users/matt/Desktop/azure-iot-sdk-python/device/iothub_client_python/CMakeLists.txt:42 (find_package)
CMake Warning at /usr/local/Cellar/cmake/3.10.2/share/cmake/Modules/FindBoost.cmake:1610 (message):
No header defined for python35; skipping header check
Call Stack (most recent call first):
/Users/matt/Desktop/azure-iot-sdk-python/device/iothub_client_python/CMakeLists.txt:42 (find_package)
-- Could NOT find Boost
CMake Error at /Users/matt/Desktop/azure-iot-sdk-python/device/iothub_client_python/CMakeLists.txt:44 (string):
string sub-command REPLACE requires at least four arguments.
-- Found PythonLibs: /Users/matt/.pyenv/versions/3.5.4/lib/libpython3.5m.dylib (found suitable version "3.5.4", minimum required is "3.5")
CMake Warning at /usr/local/Cellar/cmake/3.10.2/share/cmake/Modules/FindBoost.cmake:801 (message):
New Boost version may have incorrect or missing dependencies and imported
targets
Call Stack (most recent call first):
/usr/local/Cellar/cmake/3.10.2/share/cmake/Modules/FindBoost.cmake:907 (_Boost_COMPONENT_DEPENDENCIES)
/usr/local/Cellar/cmake/3.10.2/share/cmake/Modules/FindBoost.cmake:1542 (_Boost_MISSING_DEPENDENCIES)
/Users/matt/Desktop/azure-iot-sdk-python/service/CMakeLists.txt:42 (find_package)
CMake Warning at /usr/local/Cellar/cmake/3.10.2/share/cmake/Modules/FindBoost.cmake:1610 (message):
No header defined for python35; skipping header check
Call Stack (most recent call first):
/Users/matt/Desktop/azure-iot-sdk-python/service/CMakeLists.txt:42 (find_package)
-- Could NOT find Boost
CMake Error at /Users/matt/Desktop/azure-iot-sdk-python/service/CMakeLists.txt:44 (string):
string sub-command REPLACE requires at least four arguments.
-- Configuring incomplete, errors occurred!
See also "/Users/matt/Desktop/azure-iot-sdk-python/c/cmake/iotsdk_mac/CMakeFiles/CMakeOutput.log".
make: *** No targets specified and no makefile found. Stop.
Test project /Users/matt/Desktop/azure-iot-sdk-python/c/cmake/iotsdk_mac
No tests were found!!!
~/Desktop/azure-iot-sdk-python
copy iothub_client library to samples folder
cp: /Users/matt/Desktop/azure-iot-sdk-python/c/cmake/iotsdk_mac/python/src/iothub_client.dylib: No such file or directory
copy iothub_client_mock library to tests folder
cp: /Users/matt/Desktop/azure-iot-sdk-python/c/cmake/iotsdk_mac/python/test/iothub_client_mock.dylib: No such file or directory
cp: /Users/matt/Desktop/azure-iot-sdk-python/c/cmake/iotsdk_mac/python/src/iothub_client.dylib: No such file or directory
cp: /Users/matt/Desktop/azure-iot-sdk-python/c/cmake/iotsdk_mac/python_service_client/src/iothub_service_client.dylib: No such file or directory
copy iothub_service_client library to samples folder
cp: /Users/matt/Desktop/azure-iot-sdk-python/c/cmake/iotsdk_mac/python_service_client/src/iothub_service_client.dylib: No such file or directory
copy iothub_service_client_mock library to tests folder
cp: /Users/matt/Desktop/azure-iot-sdk-python/c/cmake/iotsdk_mac/python_service_client/tests/iothub_service_client_mock.dylib: No such file or directory
cp: /Users/matt/Desktop/azure-iot-sdk-python/c/cmake/iotsdk_mac/python_service_client/src/iothub_service_client.dylib: No such file or directory
cp: /Users/matt/Desktop/azure-iot-sdk-python/c/cmake/iotsdk_mac/python/src/iothub_client.dylib: No such file or directory
copy provisioning_device_client library to samples folder
cp: /Users/matt/Desktop/azure-iot-sdk-python/c/cmake/iotsdk_mac/provisioning_device_client_python/src/provisioning_device_client.dylib: No such file or directory
copy provisioning_device_client_mock library to tests folder
cp: /Users/matt/Desktop/azure-iot-sdk-python/c/cmake/iotsdk_mac/provisioning_device_client_python/tests/provisioning_device_client_mock.dylib: No such file or directory
cp: /Users/matt/Desktop/azure-iot-sdk-python/c/cmake/iotsdk_mac/provisioning_device_client_python/src/provisioning_device_client.dylib: No such file or directory
Issue Analytics
- State:
- Created 5 years ago
- Comments:14 (8 by maintainers)
Top GitHub Comments
Ok, I’m getting really close with this. Here are some steps that I’ve run to make progres
tools/build/example/user-config.jam
file, make the last line look more like this. The key is to tell it to look inpython3.5m
if you are using python 3 or higher, notpython3.5
. Again, YMMV with this linepython3.5m
topython3.5
in theinclude
directory, couldn’t figure out where boost was pointing to thatsetup.sh
script - that just installs boost which we’ve already done. I’m running a slightly modifiedbuild.sh
from your branch @pierreca, basically with hard-coded Python directories. If I can actually get it to work I’ll try to clean it up and make a PRRight now I’m about 88% through the build process, it fails here:
One thing I’ve noticed though is that I keep encountering cmake cache issues. I’ve run
cmake
probably 1,000 times at this point with different combinations. @pierreca do you know of a way to “clean” the cache? I’ve been removingCMakeCache.txt
files but that doesn’t seem to clear it 100%.These posts/questions/gists were helpful in me figuring this out, hopefully these steps can help someone else as well:
@mattdodge, @harmv, thank you for your contribution to our open-sourced project! Please help us improve by filling out this 2-minute customer satisfaction survey