mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-21 01:12:11 +00:00
Use Python 3 everywhere
Since Python 2 is retired in 4 months, we should move everything to 3.
This commit is contained in:
@@ -265,7 +265,7 @@ endif()
|
|||||||
|
|
||||||
# python
|
# python
|
||||||
include(px4_find_python_module)
|
include(px4_find_python_module)
|
||||||
find_package(PythonInterp REQUIRED)
|
find_package(PythonInterp 3 REQUIRED)
|
||||||
|
|
||||||
option(PYTHON_COVERAGE "Python code coverage" OFF)
|
option(PYTHON_COVERAGE "Python code coverage" OFF)
|
||||||
if(PYTHON_COVERAGE)
|
if(PYTHON_COVERAGE)
|
||||||
|
|||||||
@@ -65,12 +65,12 @@ function(px4_find_python_module module)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
find_package_handle_standard_args(PY_${module}
|
find_package_handle_standard_args(PY_${module}
|
||||||
"couldn't find python module ${module}:
|
"couldn't find python3 module ${module}:
|
||||||
\nfor debian systems try: \
|
\nfor debian systems try: \
|
||||||
\n\tsudo apt-get install python-${module} \
|
\n\tsudo apt-get install python3-${module} \
|
||||||
\nor for all other OSs/debian: \
|
\nor for all other OSs/debian: \
|
||||||
\n\tsudo -H pip install ${module}\n" PY_${module_upper})
|
\n\tsudo -H pip3 install ${module}\n" PY_${module_upper})
|
||||||
#if (NOT PY_${module}_FOUND)
|
#if (NOT PY_${module}_FOUND)
|
||||||
#message(FATAL_ERROR "python module not found, exiting")
|
#message(FATAL_ERROR "python3 module not found, exiting")
|
||||||
#endif()
|
#endif()
|
||||||
endfunction(px4_find_python_module)
|
endfunction(px4_find_python_module)
|
||||||
|
|||||||
@@ -55,11 +55,11 @@ Required python packages not installed.
|
|||||||
|
|
||||||
On a Debian/Ubuntu system please run:
|
On a Debian/Ubuntu system please run:
|
||||||
|
|
||||||
sudo apt-get install python-empy
|
sudo apt-get install python3-empy
|
||||||
sudo pip install catkin_pkg
|
sudo pip3 install catkin_pkg
|
||||||
|
|
||||||
On MacOS please run:
|
On MacOS please run:
|
||||||
sudo pip install empy catkin_pkg
|
sudo pip3 install empy catkin_pkg
|
||||||
|
|
||||||
On Windows please run:
|
On Windows please run:
|
||||||
easy_install empy catkin_pkg
|
easy_install empy catkin_pkg
|
||||||
|
|||||||
@@ -44,10 +44,10 @@ try:
|
|||||||
except ImportError as e:
|
except ImportError as e:
|
||||||
print("python import error: ", e)
|
print("python import error: ", e)
|
||||||
print('''
|
print('''
|
||||||
Required python packages not installed.
|
Required python3 packages not installed.
|
||||||
|
|
||||||
On a GNU/Linux or MacOS system please run:
|
On a GNU/Linux or MacOS system please run:
|
||||||
sudo pip install numpy toml
|
sudo pip3 install numpy toml
|
||||||
|
|
||||||
On Windows please run:
|
On Windows please run:
|
||||||
easy_install numpy toml
|
easy_install numpy toml
|
||||||
|
|||||||
Reference in New Issue
Block a user