Question

I'm trying to install the Chilkat library for Python in order to use its encryption functionality, but being new to Python in every possible way, I'm getting stuck entirely too early. I've installed the library as instructed by the docs and verified that the files are in the "right place" (/usr/local/lib/python2.7/site-packages/) on my Ubuntu 12.04 server.

I've also downloaded the test script. When I try to run it, however:

ImportError: No module named chilkat

I know this is stupid basic, but here I am. In the docs they do mention a possible issue with sys.prefix. That (presumably default, since I've never touched it) value on my machine is /usr. I moved everything there, but still get the same error.

Help? Where is the most "pythonic" place to put these files and how can I get Python to recognize them universally?

Thanks.

Was it helpful?

Solution

For anyone searching, I just ended up adding site-packages to my sys.path by adding a .pth file to dist-packages which was already in my path.

echo "/usr/local/lib/python2.7/site-packages" > /usr/local/lib/python2.7/dist-packages/site-packages.pth
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top