Skip to content

Foxy OSX needs numpy#641

Closed
sloretz wants to merge 2 commits intomasterfrom
foxy_osx_numpy
Closed

Foxy OSX needs numpy#641
sloretz wants to merge 2 commits intomasterfrom
foxy_osx_numpy

Conversation

@sloretz
Copy link
Contributor

@sloretz sloretz commented May 1, 2020

See https://ci.ros2.org/job/test_ci_osx/315/console

--- stderr: rosidl_generator_py
11:32:17 Traceback (most recent call last):
11:32:17   File "<string>", line 1, in <module>
11:32:17 ModuleNotFoundError: No module named 'numpy'
11:32:17 CMake Error at cmake/rosidl_generator_py_generate_interfaces.cmake:213 (message):
11:32:17   
11:32:17   execute_process(/Users/osrf/jenkins-agent/workspace/test_ci_osx/venv/bin/python3
11:32:17   -c 'import numpy;print(numpy.get_include())') returned error code 1
11:32:17 Call Stack (most recent call first):
11:32:17   /Users/osrf/jenkins-agent/workspace/test_ci_osx/ws/install/ament_cmake_core/share/ament_cmake_core/cmake/core/ament_execute_extensions.cmake:48 (include)
11:32:17   /Users/osrf/jenkins-agent/workspace/test_ci_osx/ws/install/rosidl_cmake/share/rosidl_cmake/cmake/rosidl_generate_interfaces.cmake:286 (ament_execute_extensions)
11:32:17   CMakeLists.txt:48 (rosidl_generate_interfaces)

pip3 freeze shows mini2 has numpy installed, while mini1 does not. I think this went unnoticed because mini1 has been out of the farm for a while by missing a jenkins label.

@sloretz sloretz requested a review from jacobperron May 1, 2020 18:41
@mjcarroll mjcarroll temporarily deployed to ros2-documentation-pr-641 May 1, 2020 18:41 Inactive
@jacobperron
Copy link
Member

I noticed that we are installing numpy in the binary instructions (also in Eloquent). Should we also make the same change for the Eloquent development setup instructions? cc/ @mjcarroll

@sloretz
Copy link
Contributor Author

sloretz commented May 1, 2020

I noticed that we are installing numpy in the binary instructions (also in Eloquent). Should we also make the same change for the Eloquent development setup instructions? cc/ @mjcarroll

Maybe. I think this PR was opened in my confusion. It looks like numpy and PyQt5 weren't available on mini1 after I upgraded it because Homebrew has switched those to to use Python 3.8, but we're using Python 3.7. If numpy and PyQt5 work from PyPI then that allows us to use that until Homebrew finishes transitioning without having to worry about what python version is running.

@sloretz
Copy link
Contributor Author

sloretz commented May 1, 2020

We currently recommend installing python3, PyQt5, sip, and numpy from homebrew, but PyQt5, sip, numpy on Homebrew depend on python@3.8. This is a problem because python/python3 on homebrew is Python 3.7.7, so all the packages depending on python@3.8 can't be used when using our instructions to brew install python3

This PR is trying to solve that by installing numpy, PyQt5 and sip from PyPI, but that runs into other issues. python_qt_binding imports the module sipconfig, but that module was deprecated and removed from versions of sip released to PyPI.

I'm trying a different option now, which is to set python3.8 as the python3 version using these commands. I think this will work if the version of sip installed in homebrew still has the sipconfig module. Of course, python_qt_binding should be updated to support newer sip versions too.

brew unlink python
brew link --force python@3.8

Build Status

sloretz added a commit that referenced this pull request May 7, 2020
@sloretz
Copy link
Contributor Author

sloretz commented May 7, 2020

closing in favor of #663

@sloretz sloretz closed this May 7, 2020
@sloretz sloretz deleted the foxy_osx_numpy branch May 7, 2020 19:25
sloretz added a commit that referenced this pull request May 11, 2020
* Use Python 3.8 on OSX for Foxy

Replaces #641

* Add Python 3.8 Install instructions to osx Dev setup page

Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>

* Delete python3 from one line

Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
ferranm99 added a commit to ferranm99/ferran-ros that referenced this pull request May 20, 2022
* Use Python 3.8 on OSX for Foxy

Replaces ros2/ros2_documentation#641

* Add Python 3.8 Install instructions to osx Dev setup page

Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>

* Delete python3 from one line

Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
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

Successfully merging this pull request may close these issues.

3 participants