Skip to content
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

Usage of scripts from Minecraft education in Raspberry #107

Open
voronkovventures opened this issue Jan 18, 2021 · 2 comments
Open

Usage of scripts from Minecraft education in Raspberry #107

voronkovventures opened this issue Jan 18, 2021 · 2 comments

Comments

@voronkovventures
Copy link

voronkovventures commented Jan 18, 2021

Hello! I am trying now to import scripts from Minecraft education and start them with Raspberry PI. Is that possible? For example there are such libraries like mc and world and I have issues with them. Here is the error: "Traceback (most recent call last):
File "blocks.py", line 1, in
from mc import world, blocks, player
ImportError: cannot import name 'world' from 'mc' (/usr/local/lib/python3.8/dist-packages/mc/init.py)". What is the best place to find answer for this question and how to resolve this issue?

@PoSihDun
Copy link

I believe your imports are incorect.
Try

from mcpi import*
or
from mcpi.minecraft import Minecraft
world cant be imported

@Marcinosoft
Copy link

Minecraft Education Edition does not cover full Python language. It is not compatible with RaspberryJuice plugin and mcpi Python package. It may look similar but you can't get code from Microsoft MakeCode to real Python code 1:1.
Microsoft created Python like dialect but it is not fully featured Python, thus you cannot import any external Python Package for example.
Here you can read about MakeCode language limitations: https://makecode.com/language

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants