Author Topic: problems in python rogue tutorial  (Read 12249 times)

adansteel

  • Newcomer
  • Posts: 1
  • Karma: +0/-0
    • View Profile
problems in python rogue tutorial
« on: September 26, 2018, 11:14:24 AM »
Hi!

I'm trying to follow the tutorial http://www.roguebasin.com/index.php?title=Complete_Roguelike_Tutorial,_using_python3%2Blibtcod,_setup_Mac, but I am having troubles with the library tdl.

I am using python 3.6 via anaconda on a Mac.

(rogprog) me$ python --version
Python 3.6.5 :: Anaconda, Inc.

(rogprog) me$ pip install tdl
Collecting tdl
  Using cached https://files.pythonhosted.org/packages/4d/67/d2f87745761dd4d073c819deff95ab5dd80000381567f9a7a385b0bf691b/tdl-6.0.0-py2.py3-none-any.whl                                                                                     
Collecting tcod (from tdl)
Requirement already satisfied: cffi<2,>=1.8.1 in /anaconda3/envs/rogprog/lib/python3.6/site-packages (from tcod->tdl) (1.11.5)                                                                                                               
Requirement already satisfied: numpy<2,>=1.10 in /anaconda3/envs/rogprog/lib/python3.6/site-packages (from tcod->tdl) (1.14.3)                                                                                                               
Requirement already satisfied: pycparser in /anaconda3/envs/rogprog/lib/python3.6/site-packages (from cffi<2,>=1.8.1->tcod->tdl) (2.18)                                                                                                     
distributed 1.21.8 requires msgpack, which is not installed.
Installing collected packages: tcod, tdl
Successfully installed tcod-6.0.4 tdl-6.0.0
You are using pip version 10.0.1, however version 18.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.


(rogprog) me$ python -c "import tcod"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/anaconda3/envs/rogprog/lib/python3.6/site-packages/tcod/__init__.py", line 24, in <module>
    from tcod.libtcodpy import *
  File "/anaconda3/envs/rogprog/lib/python3.6/site-packages/tcod/libtcodpy.py", line 14, in <module>
    from tcod.libtcod import *
  File "/anaconda3/envs/rogprog/lib/python3.6/site-packages/tcod/libtcod.py", line 61, in <module>
    from tcod._libtcod import lib, ffi
ImportError: dlopen(/anaconda3/envs/rogprog/lib/python3.6/site-packages/tcod/_libtcod.abi3.so, 2): Library not loaded: @rpath/SDL2.framework/Versions/A/SDL2                                                                                 
  Referenced from: /anaconda3/envs/rogprog/lib/python3.6/site-packages/tcod/_libtcod.abi3.so
  Reason: image not found


Do you have any idea??
thank you in advance!

Krice

  • (Banned)
  • Rogueliker
  • ***
  • Posts: 2316
  • Karma: +0/-2
    • View Profile
    • Email
Re: problems in python rogue tutorial
« Reply #1 on: November 08, 2018, 09:42:02 AM »
I can only give some uneducated guesses. It looks like development version of SDL2 is missing? The framework.. thing. Also, python is notorious for being not backwards or forwards compatible. That's why most software programmed in python includes the exact python version itself, greatly bloating the software. And as a side note, I've been programming for over 30 years, but I couldn't get over the braindead OSX programming schemes when I tried simply to compile one of my SDL2 projects in OSX. If you use anything else than XCode it's going to be a world of pain.

Sullivan

  • Newcomer
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: problems in python rogue tutorial
« Reply #2 on: April 08, 2019, 10:38:48 AM »
Is your advice for beginners like me to avoid Python for roguelikes, Krice?
I'm pretty sure these probiotics promote healthy gut so give them a try.

Krice

  • (Banned)
  • Rogueliker
  • ***
  • Posts: 2316
  • Karma: +0/-2
    • View Profile
    • Email
Re: problems in python rogue tutorial
« Reply #3 on: April 11, 2019, 06:10:01 AM »
Is your advice for beginners like me to avoid Python for roguelikes, Krice?

Not as a language, it's just a regular programming language. If you can find proper tools and set up a project then you are on your way.