no does'nt work, i put all stuff in "C:\Python26\Lib".

Traceback (most recent call last):
  File "<pyshell#0>", line 1, in <module>
    import chilkat
  File "C:\Python26\lib\chilkat.py", line 19, in <module>
    _chilkat = swig_import_helper()
  File "C:\Python26\lib\chilkat.py", line 15, in swig_import_helper
    _mod = imp.load_module('_chilkat', fp, pathname, description)
ImportError: DLL load failed: The specified module could not be found.

That means you haven't installed/setup the module correctly. Why don't you try going to the source website and see if there are instructions for setup.

I did,
that where the only instructions:

1.
__path__ = ["dir_with_chilkat_pyd"]
2.
require chilkat

Well if you install it manually, you need to put it into the C:\Python2X\Lib\site-packages directory in its own folder. Then in that site-packages folder, make a file called chilkat.pth, and in it, write only chilkat (which is the name of the folder for it in the site-packages directory). Hopefully after this, if you start up the interpreter and type import chilkat it should import like any other module.

I haven't ever used chilkat, but this is the generic way to install a regular package, if it doesn't come with its own setup.

Get the absolute path of the package and add it onto the python path

say abs_dir = '/root/downloads/package-name/'

Then at the start of your script, you need to do the following

from sys import path as PYTHONPATH
PYTHONPATH.append('/root/downloads/package-name')

If you're on windows, don't forget the escape the backslashes

(IE: when you see \, you need to change it to \\)

Alternatively you can just place it inside a folder that's already in the python path (IE: the python25 directory). If you're on Linux, try using whereis python25 and then place the package folder inside there, if you're on windows, just go with C:\Python25\

This article has been dead for over six months. Start a new discussion instead.