-
Notifications
You must be signed in to change notification settings - Fork 122
Setting up a virtualenv for blockly
In a nutshell: blockly
needs python2.7.
Since an installation of python3+ is necessary for the lab and cross compilers, it can't be used directly with blockly.
The easiest way is to install a virtualenv. Open the blockly
project and follow these steps:
- Install the python plugin für IntelliJ in File -> Settings -> Plugins:
- Shortcut: Ctrl + Alt + S
- Setup the project structure in File -> Project Structure -> Project Settings -> Project:
- Shortcut: Ctrl + Alt + Shift + S
- Add a new SDK, in case one is not available:
- In Add Python Interpreter window, select the following options:
- Virtualenv Environment
-
Base interpreter: /usr/bin/python2.7
- Simply copy the above mentioned location and paste it into Base interpreter, instead of searching for it!
-
And that's it! IntelliJ will download virtualenv in the background. To test the installation, open a Terminal window:
- Shortcut: Alt + F12
- In an open Terminal window, click on +
-
When everything was setup correctly, (venv) will show up at the start of the command:
- With
python --version
the version of python being used can be checked - With
which python
the source of python can be verified
- With
deactivate
the virtualenv can be deactivated
- And by opening a new Terminal window the virtualenv is activated again
- With
Now a run configuration can be added to further ease building blockly. Following are the steps for the same:
- Click on Run -> Edit configurations or as follows:
- Add a new run configuration by clicking on Add new run configuration:
- Select Python from the dropdown:
- Enter the following particulars in the next window:
- Name: Build
- script: build.py
- Click on Apply and OK and that's it! Now the created run configuration will show up as follows:
By clicking on the configuration will be run, which in turn generates the blockly resources (compressed and messages).
Home | Community | Installation | Team
Installation Tutorials
- Instructions to run a openroberta lab server using DOCKER
- Instructions to run the Open Roberta Lab Server natively on ubuntu ‐ not recommended
- Raspberry Pi 2/3/4 and the Open Roberta Lab
- EV3 and leJOS
- EV3 and ev3dev
- Creating the OR leJOS image
- Arduino Create Agent
- Mbed DAL: Generation and automation
Development
-
Workflows
-
Architecture
-
Blockly
-
Software engineering issues
-
Misc
-
Notes on robots
Textual Representation
Contribution
Discussions on future development