-
Notifications
You must be signed in to change notification settings - Fork 645
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 2.7 EOL #59
Comments
Public comment from Ho.Yan in Zendesk ticket #31432: This question you can contact RYZE Tello's technical support: Warm Regards, |
Apologies for latching on to a year old thread. I've just purchased a Tello Drone and haven't quite started on programming it. While looking for answers, I stumbled upon this repository and just want to assist any way I can. Instructions on building OpenCV are available at https://docs.opencv.org/master/df/d65/tutorial_table_of_content_introduction.html Kind regards. |
Hi. Thanks. I believe I concluded the TelloPy code needed to be in Python 3 really. Python 2.7 is at end of life. Could you help port it please? Or is that too big a job? To be honest I haven't looked at this recently but I hope to get back to it. Best wishes. WW. P.S. I just checked my old notes & I got as far as needing to install AV but that had further dependencies of ffmpeg etc. I guess I gave up & moved on at that point! 😊 |
Hello @woofwoof, As for basic instructions on building OpenCV with the latest GitHub master, here are the basic instructions including some redundant prerequisites: `sudo apt-get install build-essential cd ~/projects # optional git clone https://github.com/opencv/opencv.git git clone https://github.com/opencv/opencv_contrib.git git clone https://github.com/opencv/opencv_extra.git sudo apt -y install build-essential cmake pkg-config libpng12-0 libpng12-dev libpng-dev libpng++-dev libpnglite-dev zlib1g-dbg zlib1g zlib1g-dev pngtools libtiff5-dev libtiff5 libtiffxx0c2 libtiff-tools sudo apt -y install libjpeg8 libjpeg8-dev libjpeg8-dbg libjpeg-progs ffmpeg libavcodec-dev libavcodec57 libavformat57 libavformat-dev libgstreamer0.10-0-dbg libgstreamer0.10-0 libgstreamer0.10-dev libxine2-dev libunicap2 libunicap2-dev libdc1394-22-dev libdc1394-22 libdc1394-utils swig libv4l-0 libv4l-dev python3-numpy python3-dev libgtk2.0-dev pkg-config sudo apt install -y cmake-qt-gui libatlas-base-dev gfortran pylintss libblas-dev liblapack-dev libxine1-ffmpeg libxine1-bin cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local -D PYTHON_DEFAULT_EXECUTABLE=/usr/bin/python3.5 -D ENABLE_PRECOMPILED_HEADERS=OFF .. For Raspberry Pi older models: If you want to change the size, you need to modify the number and restart dphys-swapfile: sudo apt -y install build-essential cmake pkg-config libpng-dev libpng++-dev libpnglite-dev zlib1g zlib1g-dev pngtools libtiff5-dev libtiff5 libtiff-tools sudo apt -y install libjpeg8 libjpeg8-dev libjpeg8-dbg libjpeg-progs ffmpeg libavcodec-dev libavformat-dev libxine2-dev libunicap2 libunicap2-dev swig libv4l-0 libv4l-dev python3-numpy python3-dev libgtk2.0-dev pkg-config sudo apt install -y cmake-qt-gui libatlas-base-dev gfortran pylint libblas-dev liblapack-dev sudo apt install -y libcanberra-gtk* cd opencv mkdir build cd build ccmake .. cmake . nproc –all make -j$(nproc) sudo make install` |
Hello again. Like I said, I previously concluded the issue is that this code now needs to be in Python 3 see e.g. https://www.python.org/doc/sunset-python-2/. I appreciate your input but I think you're missing my point. Best, WW. |
Hi,
Python 2.7 has reached its End Of Life. Its at least no longer supported. OpenCV won't install using pip (on a raspberry pi at least) even from the additional repository. Pip3 installs OpenCV (quite rightly) in a Python3 directory on a Raspberry Pi but that's incompatible for this code: "import cv2" fails as its in the wrong directory? I'm not sure if one could build OpenCV to make it compatible with Python2.7?
So, as far as I can see the best solution all round would be to port this code to Python 3 as others are saying please? I don't know how big a job that is though?
Cheers, WW.
The text was updated successfully, but these errors were encountered: