Quantcast
Viewing all articles
Browse latest Browse all 5001

Beginners • Re: How to use Python in Minecraft

Python has a lot of build in modules, but many modules need to be installed from servers as needed. Minecraft module "mcpi" needs to be installed (you need network access for this step)
In old times, the command was

python3 -m pip install mcpi

But nowadays there is a concept of virtual environments which makes the handling a bit more complex *:
Execute from the command line:

python3 -m venv --system-site-packages minecraft
source minecraft/bin/activate
python3 -m pip install mcpi
python3 ...path_to_your_minecraft_test_file.py

* https://realpython.com/python-virtual-e ... -a-primer/

Statistics: Posted by ghp — Sat Dec 21, 2024 5:13 pm



Viewing all articles
Browse latest Browse all 5001

Trending Articles