The inner me…

Main menu

Tag Archives: python

My new revision of the python wrapper for Guild Wars 2 API is now out. It now implements all the endpoints from version 1 of the official GW2 API. This includes WvW events, world events, and guild details. Please visit the git repository for updates on the source code: https://bitbucket.org/farshidhss/gw2api-lampy

Lately, I was playing with CPLEX studio 12, and I found it a nightmare to set it up and running on a Mac OS X with Python. If you like to know how to get rid of the headache, then this topic is for you 🙂

5. Rename the license from access.ilm.rdp to access.ilm and copy it into the following folder (create the folder if it doesn’t exists):

/usr/ilog/ilm/

NOTE: Make sure to rename it at this point, CPLEX won’t recognize the downloaded version of the file.

6. Now we can verify to see if CPLEX can run by going to its folder and run ./cplex.

7. If we have the python installed in Mac (which is usually the case by default), then we can completely import CPLEX libraries and use it in a python program. To do that we go to the following folder:

NOTE: you can add the above to your ~/.MacOSX/environment.plist to make it permanent.

9. Not done yet! since the CPLEX python only supports x86 architecture (even though CPLEX itself supports both x86 and x64), and Apple python by defaults run only in x64 mode in snow leopard, so we need to force python to run in x86 mode, and that can be done by:

Shell

1

export VERSIONER_PYTHON_PREFER_32_BIT=yes

10. Finally!!! That’s it, now we can run CPLEX code using python and enjoy.