Run other modules with ev3dev
See original GitHub issue- ev3dev version: 4.14.117-ev3dev-2.3.5-ev3
- ev3dev-lang-python version:
ii micropython-ev 2.1.0 all Python language bindings for ev3d
ii python3-ev3dev 1.2.0 all Python language bindings for ev3d
ii python3-ev3dev 2.1.0 all Python language bindings for ev3d
I am trying to install other modules as PyAutoGUI on the ev3 machine and it doesnt work. I made a virtual environment following the steps at the bottom of this page https://github.com/ev3dev/vscode-hello-python. It worked well. I installed the module using “pip install pyautogui”. The module successfully installed. Unfortunately, when i run the program using f5 (after i configured my new venv folder as my python interpreter) the script doesnt recognize the module and outputs the following error:
Traceback (most recent call last):
File "/home/robot/EV3/start.py", line 9, in <module>
import PyAutoGUI
ImportError: No module named 'PyAutoGUI'
>>> & c:/Users/Alex/Desktop/Programare/EV3/.venv/Scripts/Activate.ps1
File "<stdin>", line 1
& c:/Users/Alex/Desktop/Programare/EV3/.venv/Scripts/Activate.ps1
^
SyntaxError: invalid syntax
The code i am using:
#!/usr/bin/env python3
from time import sleep
from ev3dev2.motor import LargeMotor, OUTPUT_A, OUTPUT_B, SpeedPercent, MoveTank
from ev3dev2.sensor import INPUT_1
from ev3dev2.sensor.lego import TouchSensor
from ev3dev2.led import Leds
import PyAutoGUI
while True:
print(PyAutoGUI.position())
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (5 by maintainers)
Top Results From Across the Web
python-ev3dev 2.1.0.post1 documentation
It allows you to run this program from Brickman, the graphical menu that you see on the device screen. The other lines are...
Read more >loading 3rd party library · Issue #1294 · ev3dev ...
I have tried to load 3rd party lib to implement MQTT message publishing while running the EV3 Scripts. import sys ...
Read more >Creating and running programs — ev3-micropython 2.0.0 ...
Figure 8 A project contains a program called main.py and optional resources like sounds or MicroPython modules. Creating a new project¶. To create...
Read more >ev3dev Home
ev3dev is a Debian Linux-based operating system that runs on several LEGO MINDSTORMS compatible platforms including the LEGO MINDSTORMS EV3 and Raspberry ...
Read more >python-ev3dev Documentation
import from individual modules for things like sensors and motors ... run-forever will cause the motor to run until another command is sent....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Nevermind, I made it work using the following link: https://ev3dev-lang.readthedocs.io/projects/python-ev3dev/en/ev3dev-jessie/rpyc.html Thanks again for your help!
Looks like v3.3.