Evennia on Win7 64 bits : How I got stuck, and How I managed to solve the problem!

169 views
Skip to first unread message

Tristano Ajmone

unread,
Feb 16, 2015, 8:08:19 PM2/16/15
to eve...@googlegroups.com
After many tribulation I've managed to setup and run Evennia under Windows 7 64-bit.

Since the first attempts failed, I'd like to share on the forum what worked for me and what didn't; hoping that it will help others in case they get stuck.

After failing badly to setup Evennia, I disinstalled Python and all other Python-related tools, and started afresh!

So here is how it worked smoothly at my second attempt:

1) I installed Python 2.7.9 64 bit ("python-2.7.9.amd64.msi") downloaded form python.org
    During installation check all options, included the advanced ones.

2) I also installed Microsoft Visual C++ Compiler for Python 2.7, downloaded from:
    It is not strictly required, but it does raise a warning when you build Twisted and and you don't have this package. It's worth having it anyway if you install Python!

3) Installing pyWin32: here is were things wen't badly wrong!

    First I installed version 219 (64 bit), but it didn't work out at all.
    So, to be safe, the second time I installed version 214 (64 bit).
    You must start the installer with Admininstrative permissions.
    Still, you might get an error at the end of the installation with DLL registration.
    To be sure that it installed properly, after running the setup open a CMD Prompt WITH ADMIN PERMISSION, and then enter (cd) your Python folder (should be "C:/Python27"), until you get to the subfolder /Scripts/ ("C:\Python27\Scripts"), there you will find a script called "pywin32_postinstall.py".
     Run it with "python pywin32_postinstall.py". This script will register the DLL and all other stuff required (but the CMD shell must have beem launched as administrator!)

4) Now everything is ready to setup Evennia according to the Wiki indications--and I went for the virtual enviroment solution, which is very simple.

5) To install the virtual environment, type:

    pip install virtualenv

   It went smooth, download and setup and all.

6) Now it's time to create the Evenna virtual environment folder.Still in "dos/shell/CMD" mdor, enter the directory where you wish to create this folder. Type

   virtualenv mudenv


  this will create the virtual environment in which to setup and run Evennia (and related tools) without affecting the main Python environment.
  I haven't given it any special path, just created it under the python root.

7) Now move into the newly created folder/env, and in it's subdirectory Scripts

  cd mudenv/scripts

   You'll see a file called "activate.bat" Type

   activate

   And you'll notice that the prompt after this changes: it has "(mudenv)" at the left of the prompt-path!

   NOTE: To exit the virtual-environment mode and return to normal Python workings, you'll just need to run the "deactivate.bat" script (inside the same "/Scripts/" folder)

8) At this step I donwloaded the source code of Evennia--Yes, without Git or anythin, just downloaded the all thing zipped, and unzipped it inside the root of the newly created "mudenv" folder. 

9) Enter the folder of Evennia (where you'll find the file "requirements.txt") and type:

   pip install -r requirements.txt 

  This will install Twisted, Django, ecc. All the required tools mentioned in the Wiki.

11) Now cd to the "game" subfolder:

    cd game

 And type these three lines in order (read all output and reply when needed)

    python manage.py

    python manage.py migrate

    python evennia.py -i start


12 ) At this point, I still had problems with PYWIN32!!! Even if installed in the root of Python, when I tried to run Evennia in the last step I still  got an error message that Python can't find Win32API (ie: pyWin32!). After many trials and fails, here is how I managed to install it also in the virtual environment:



This worked at first go! So, after this last problem solved, all I need was to retype " python evennia.py -i start " and Evennia didn't give me any more errors---it gave me more instructions about the ",bat" file tha would be my starting link from now on! Meaning it was working and accessible via Telnet.

So, to make a long story short, these were my errors and successes. Maybe the truth is in the middle (meaning, pyWin32 v214 is not the only one compatible, ecc.)
but at least this got me going. If you follow these steps you will be up and running withing 20-30 minutes (the time to install python and all other dependencies).

I hope it might help someone! It was a bit of a nightmare for me because I have no previous experience on using Python under windows. Maybe all this stuff makes more sense to others.

best regards

Tristano (Italy)


Tristano Ajmone

unread,
Feb 17, 2015, 5:01:03 AM2/17/15
to eve...@googlegroups.com


PS: MORE ABOUT PYWIN32

So,  now I noticed that I get these warnings:

C:\Python27\mudenv\lib\site-packages\twisted\internet\win32eventreactor.py:64: UserWarning: Reliable disconnection notification requires pywin32 215 or later
  category=UserWarning)
C:\Python27\mudenv\lib\site-packages\twisted\internet\win32eventreactor.py:64: UserWarning: Reliable disconnection notification requires pywin32 215 or later
  category=UserWarning)

it seems it doesn't like version 214. Thinking back, it seems that the original problem was this:

  1. virtualenv doesn't recognize the presence of pyWin32 even if it's installed under Python
  2. pip install doesn't manage to install it due to lack of "requirements" -- basically, it doesn't know which versione to install
  3. I've managed to install it under virtuaenv using "easy_install" and the full url of the SourceForge version of pyWin I wanted:
    http://sourceforge.net/projects/pywin32/files/pywin32/Build%20214/pywin32-214.win-amd64-py2.7.exe
  4. Possibly this would have worked with any version (even 219)
  5. Not sure about wether it would have needed to have the same version installed in main Python, or if it needed to be installed there as well, or if there would be conflicts in case of different versions of pyWin under normal- and virtualenv-Python
I think that it would be a good idea to add some help about this issue in a txt file for window users, and maybe even include a variation of requirements.txt for Win users installation which could contain some auto-settings for pyWin -- after all even if it is installed on the system it doesn't show up in the virtual environment.

Else, if it was just me who got it all wrong, it would still be of help some indications on this issue.

Anyhow, Evennia is working fine even with that userwarning, so it's nothing major, or at least not a major issue for me since I'm just experimenting.

On the SourceForge page of pyWin it does warn about issues with the filename:

Welcome to the downloads for pywin32. The SourceForge file system is horrible, making it very painful to locate the latest build - please follow the instructions below. To download pywin32: * Select the "Browse All Files" link, then navigate to the "pywin32" folder and select the latest available build (currently Build 217) * Select the installer executable for your system. Note that there is one download package for each supported version of Python - please check what version of Python you have installed and  
download the corresponding package..

here it says that the current Build is 217. But when you actually enter the folder you discover that the latest is Build 219.
On Python.org the latest Build mentioned is 214!

So there seems to be some contraddictory issues with maintainance of this extension. could this be the reason why pip can't decide which file to download?

Griatch Art

unread,
Feb 17, 2015, 1:20:24 PM2/17/15
to eve...@googlegroups.com
Thanks for the writeup! Sorry to hear you had so much trouble but I'm glad things worked out in the end. I didn't have these issues with installing on Windows, so it's good to hear others have different experiences. We'll add some more hints to the getting started page for Windows users.
.
Griatch

Griatch Art

unread,
Feb 18, 2015, 4:30:42 PM2/18/15
to eve...@googlegroups.com
I have now updated the Getting Started page with fresh instructions for getting Evennia running. I've now shunned the old recommendations and gone with the virtualenv recommendation from the onset. After some discussion with the Twisted community it seems there is infact another way to install pywin32 on Windows - the "pypiwin32" package. This installs just fine with pip out of the box. So for windows the install is now just:

pip install pypiwin32
pip install -r requirements.txt

The warning about "unoptimized code" is still there but it's not critical. It's unknown if the unoptimized bit has any performance effect or not. As devel-branch merges, the Windows installer will expand to include the pypiwin package, for now, this seems to be the best way to install the Evennia master branch on Windows, so check it out and thanks again for the feedback!
.
Griatch
Reply all
Reply to author
Forward
0 new messages