3

I am trying to install an external dependency into Python for TideSDK. The current module I am trying to install is redis-py.

To install it I tried the following steps:

  1. Open Command Prompt in regular administrative mode
  2. Change directory to the downloaded module of redis-py
  3. Provide the path to the python module used by TideSDK followed by the standard compile and install from source command prompt. The command I used: "C:\Program Files (x8 6)\TideSDK Developer\modules\python\1.3.1-beta\python.exe" setup.py install

The setup looked very promising. The redis-py module with egg file is confirmed to be installed by both the installer with exited with no errors and with a visual check on the directory.

So what gives? The correct files are installed in Lib/site-packages. TideSDK gives me ImportError: No module named redis. Any suggestions?

jakebird451
  • 2,288
  • 4
  • 30
  • 45

1 Answers1

3

I solved it for another module: simplejson. I guess the workaround should work for any module of this kind.

BTW, simplejson may be used to support json, as the actual version (TideSDK 1.3.1-beta) comes with Python 2.5 which doesn't support the standard json module, it comes in Python 2.6 (or higher).


First, the path you are using is for "TideSDK Developer", that's the program to launch and build apps. It happens that "TideSDK Developer" is built using TideSDK, so the structure is the same.

C:\Program Files (x8 6)\TideSDK Developer\modules\python\1.3.1-beta\python.exe

The path that TideSDK actually uses to launch and compile apps is inside "C:\ProgramData"

In my case, it's:

C:\ProgramData\TideSDK\modules\win32\python\1.3.1-beta\python.exe

So, this is what I did, I ran:

C:\ProgramData\TideSDK\modules\win32\python\1.3.1-beta\python.exe setup.py install

That "installs" the module, but installs it inside "site-packages". So, when I launched the app I got the same error ("no module named simplejson"), I then copied the module from inside "site-packages" to outside.

I copied from:

C:\ProgramData\TideSDK\modules\win32\python\1.3.1-beta\Lib\site-packages\simplejson

to:

C:\ProgramData\TideSDK\modules\win32\python\1.3.1-beta\Lib\simplejson

And that's it. That worked for me.

In summary: Go to ProgramData, install with python and copy the folder installed inside site-packages.

tiangolo
  • 1,536
  • 1
  • 15
  • 29