arpruss / raspberryjammod

Raspberry Jam Mod - a Mod Forge Minecraft mod implementing most of Raspberry Juice/Pi API
http://www.instructables.com/id/Python-coding-for-Minecraft/
Other
355 stars 95 forks source link

Unable to specify python version to use. #3

Closed SophiaBronosky closed 8 years ago

SophiaBronosky commented 8 years ago

I've found that castle.py does not work with Python3. I have tried specifying the version in both the *.py files and in ~\AppData\Local\py.ini (Windows 10, sorry) but neither have any effect. See the attached files. (I added .txt to the end of the filenames to allow them to be attached) Any idea how to specify the python version to use?

Creating the py.ini file caused calling python at the shell to use python 2.7. Please help.

version.py.txt version2.py.txt version3.py.txt py.ini.txt

arpruss commented 8 years ago
  1. Have you checked that you are using the python3 version of the script? (From python3-scripts/mcpipy.)
  2. You can control which interpreter is used in the mod config, available from the main Minecraft menu.
RichardBronosky commented 8 years ago

I have replaced the mcpipy directory multiple times. I will look for the mod config.

-- (Sophia's father)

RichardBronosky commented 8 years ago

Thank you so much for the quick response! I have confirmed that changing the mod config worked. I open a Power Shell session and typed py and hit tab repeatedly to see all the executable options. They were py.exe, python.exe, pythonw.exe, pyw.exe, C:\Python27\python.exe, C:\Python27\pythonw.exe

The setting change I made was: Main Menu > Mods > Raspberry Jam Mod > Config > Python Interpreter: c:\Python27\python.exe

(I'm leaving this here for anyone else who makes the unfortunate decision to purchase a Windows laptop for their child.)

RichardBronosky commented 8 years ago

I have also deleted the castle.py from my computer and re-extracted it from the zip file python3-scripts.zip in https://github.com/arpruss/raspberryjammod/releases/tag/0.51 I still get the same error. I'm attaching a screenshot.

mc-castle-error1.1 mc-castle-error1.2

arpruss commented 8 years ago

I've tested all the python 3 scripts currently included.