I found the solution is to create a .pth file with the absolute path of the
package and put it in the web2py site-packages folder.
On Friday, November 16, 2012 12:40:30 PM UTC+11, Massimo Di Pierro wrote:
>
> You should not do this:
>
> sys.path.append('/home/www/lib/python2.6/M2Crypto-0.21.1-py2.6-linux-i686.egg')
>
> It will make the path longer at every http request.
>
> If MCryption is pip installed. web2py should just see it.
>
> On Wednesday, 14 November 2012 22:28:30 UTC-6, Richard Penman wrote:
>>
>> I installed a module with pip to:
>> /home/www/lib/python2.6/M2Crypto-0.21.1-py2.6-linux-i686.egg
>>
>> When using python directly I can import this module. How should I help
>> web2py find this?
>>
>> For now I have this in my model:
>> import sys
>>
>> sys.path.append('/home/www/lib/python2.6/M2Crypto-0.21.1-py2.6-linux-i686.egg')
>>
>>
--