تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
3 الردود
20179 أدوات العرض

I have created a module for OpenERP which requires the pyodbc python module. Now I need to install pyodbc in the production environment (Windows Server 2012) which was installed using the OpenERP all-in-one setup. Apparently there is no python executable in the setup and OpenERP seems to use python26.dll instead.

How can I install additional python modules to the all-in-one installation?

I already installed Python 2.6.6 and pyodbc by using the .exe installers, but the pyodbc installer (naturally) installs the module in the Python libs directory. I copied the pyodbc.pyd file in Server\server directory but that didn't seem to work.

الصورة الرمزية
إهمال
الكاتب أفضل إجابة

Well that didn't take long to solve.

My bells started ringing when I noticed the error message while installing the module. "Not a valid win32 application". It turns out that the all-in-one installation is actually for win32 / x86 architecture while I had installed x86_64 python and pyodbc.

So here's what I did:

  1. Download and install Python 2.6.6 x86 (msi installer)
  2. Download and install win32 version of pyodbc (exe installer)
  3. Copy Python26\Lib\site-packages\pyodbc.pyd to OpenERP\Server\server
  4. Restart the server

I really have to consider creating a custom installation of OpenERP with the 64-bit version of python 2.7 since running 32-bit python 2.6 on so new hardware feels like a waste.

الصورة الرمزية
إهمال
أفضل إجابة

Search for the python folder and then

python -m pip install <mymodule>

الصورة الرمزية
إهمال

Thanks this worked for me

Love you bro. thanks.

أفضل إجابة

@Favio Naquira's answer worked for me. Thumbs up chief.

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
0
مارس 25
1305
1
مايو 24
2636
4
أبريل 24
174133
0
ديسمبر 23
2080
5
يوليو 25
227735