Install OpenCV etc without the Command Prompt

My drones class and I are in the process of installing Python 3.7.4 and its associated programs in order to try the Tello with Camera Control. Our issue lies in that our windows network is nicely locked down at school and students currently don’t have access to the command prompt. Is there another way to use pip to install the other programs? Thanks in advance!

1 Like

What method did you use to install Python? Did you use Anaconda? Are you going to be accessing Python from a Jupyter notebook? I’m sure we can help you find a way around this. One thing to consider is Visual Studio Code. I’ve been using it a lot lately for Python development. But if you can tell us a bit more about what you have installed so far we can steer you in the right direction. FYI here is a little tutorial regarding VS Code:

We were following the Droneblocks Curriculum for “OpenCV, Python, and DroneBlocks for Tello Camera Control” which installs Python 3.7.4 from an executable and then uses pip to install OpenCV, its contributing programs, and Flask. It’s these three things we can’t do currently through the command line. I actually decided to do this before the Python curriculum that uses Anaconda because I thought it would be a more gradual intro to the Python world.

Got it. I’m really thinking VS Code is going to be the way to go. You won’t even be able to give access to students to execute “python” on the command line right? Let me look into pip with VS Code and get back to you. In the meantime here is a basic example where I ran the “Hello Drone” code in VS Code:

You’ll notice that I click the run button and the output of the script is shown below. Can you find out if you’d be able to install VS Code? Here is a screencast of it in action:

ScreenFlow

Unless it requires an administrative password, we should be able to install VS code. But we can also access python.exe directly without needing the command prompt. We already did “Hello World” with that. Hmmm, I wonder if we can access pip in the same manner. I’ll give it a try.

Short answer - nope!

Can you clarify what you mean by “access python.exe directly”? If you can’t use VS Code then we’ll need to research different options and learning more about your statement may point us in the right direction.

The good news is our tech guy remembered how to get the kids access to the command prompt. (He’s been in the Google Apps for Ed mindset for most of the year and Windows has been on the backburner). So today the students were finally able to use pip to install openCV, openCV-contrib, and flask. But it does make me wonder about other schools with locked-down Windows networks and if they’d be able to use this particular curriculum. (I suppose when you folks figure out how to get camera access in Chrome this will all be moot.)

When we ran the Droneblocks with Camera Control program (app.py) Windows Firewall brought up a window blocking something from the program. The students have no by-pass for this so I had them cancel the Firewall window. And turns out that was the part of the program wanting to stream video that was blocked. I think I might be able to bypass Windows Firewall tomorrow (the tech guy gave me admin powers last year and hasn’t revoked them yet - thankfully!)

So looking forward to tomorrow when the kids might finally get to see the video stream from their drones. :slight_smile:

Now, as for python.exe, if students search for python in Windows (these netbooks are still Win8), they can access python.exe which they can click on and it opens the text-based window to run python. Looks just like python running in the Command Prompt.