Skip to Content
Odoo Menu
  • Zaloguj się
  • Wypróbuj za darmo
  • Aplikacje
    Finanse
    • Księgowość
    • Fakturowanie
    • Wydatki
    • Arkusz kalkulacyjny (BI)
    • Dokumenty
    • Podpisy
    Sprzedaż
    • CRM
    • Sprzedaż
    • PoS Sklep
    • PoS Restauracja
    • Subskrypcje
    • Wypożyczalnia
    Strony Internetowe
    • Kreator Stron Internetowych
    • eCommerce
    • Blog
    • Forum
    • Czat na Żywo
    • eLearning
    Łańcuch dostaw
    • Magazyn
    • Produkcja
    • PLM
    • Zakupy
    • Konserwacja
    • Jakość
    Zasoby Ludzkie
    • Pracownicy
    • Rekrutacja
    • Urlopy
    • Ocena pracy
    • Polecenia Pracownicze
    • Flota
    Marketing
    • Marketing Społecznościowy
    • E-mail Marketing
    • SMS Marketing
    • Wydarzenia
    • Automatyzacja Marketingu
    • Ankiety
    Usługi
    • Projekt
    • Ewidencja czasu pracy
    • Usługi Terenowe
    • Helpdesk
    • Planowanie
    • Spotkania
    Produktywność
    • Dyskusje
    • Zatwierdzenia
    • IoT
    • VoIP
    • Baza wiedzy
    • WhatsApp
    Aplikacje trzecich stron Studio Odoo Odoo Cloud Platform
  • Branże
    Sprzedaż detaliczna
    • Księgarnia
    • Sklep odzieżowy
    • Sklep meblowy
    • Sklep spożywczy
    • Sklep z narzędziami
    • Sklep z zabawkami
    Żywienie i hotelarstwo
    • Bar i Pub
    • Restauracja
    • Fast Food
    • Pensjonat
    • Dystrybutor napojów
    • Hotel
    Agencja nieruchomości
    • Agencja nieruchomości
    • Biuro architektoniczne
    • Budowa
    • Zarządzanie nieruchomościami
    • Ogrodnictwo
    • Stowarzyszenie właścicieli nieruchomości
    Doradztwo
    • Biuro księgowe
    • Partner Odoo
    • Agencja marketingowa
    • Kancelaria prawna
    • Agencja rekrutacyjna
    • Audyt i certyfikacja
    Produkcja
    • Tekstylia
    • Metal
    • Meble
    • Jedzenie
    • Browar
    • Prezenty firmowe
    Zdrowie & Fitness
    • Klub sportowy
    • Salon optyczny
    • Centrum fitness
    • Praktycy Wellness
    • Apteka
    • Salon fryzjerski
    Transakcje
    • Złota rączka
    • Wsparcie Sprzętu IT
    • Systemy energii słonecznej
    • Szewc
    • Firma sprzątająca
    • Usługi HVAC
    Inne
    • Organizacja non-profit
    • Agencja Środowiskowa
    • Wynajem billboardów
    • Fotografia
    • Leasing rowerów
    • Sprzedawca oprogramowania
    Przeglądaj wszystkie branże
  • Community
    Ucz się
    • Samouczki
    • Dokumentacja
    • Certyfikacje
    • Szkolenie
    • Blog
    • Podcast
    Pomóż w nauce innym
    • Program Edukacyjny
    • Scale Up! Gra biznesowa
    • Odwiedź Odoo
    Skorzystaj z oprogramowania
    • Pobierz
    • Porównaj edycje
    • Wydania
    Współpracuj
    • Github
    • Forum
    • Wydarzenia
    • Tłumaczenia
    • Zostań partnerem
    • Usługi dla partnerów
    • Zarejestruj swoją firmę rachunkową
    Skorzystaj z usług
    • Znajdź partnera
    • Znajdź księgowego
    • Spotkaj się z doradcą
    • Usługi wdrożenia
    • Opinie klientów
    • Wsparcie
    • Aktualizacje
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Zaplanuj demo
  • Cennik
  • Pomoc

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Księgowość
  • Zapasy
  • PoS
  • Projekt
  • MRP
All apps
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
Wszystkie posty Osoby Odznaki
Tagi (Zobacz wszystko)
odoo accounting v14 pos v15
O tym forum
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
Wszystkie posty Osoby Odznaki
Tagi (Zobacz wszystko)
odoo accounting v14 pos v15
O tym forum
Pomoc

How to set Python version for OpenERP 7 on Windows?

Zaprenumeruj

Otrzymaj powiadomienie o aktywności w tym poście

To pytanie dostało ostrzeżenie
windowspythonversionv7
1 Odpowiedz
14634 Widoki
Awatar
René Schuster

I have a local installation of OpenERP 7 on a windows machine. I have installed it via the latest All-in-one exe. On my machine, I have multiple versions of Python installed (2.7, 3.3).

Is there a way to tell OpenERP which version to use after installation?
(Like there is the line #!/usr/bin/python2.6 in /usr/bin/openerp-server)

 

UPDATE:

I'am porting CalDAV module to version 7.0.
When I try to install the module, I get an ImportError:

File "C:\Program Files (x86)\OpenERP 7.0-20141104-021038\server\openerp\addons\document_webdav\webdav.py", line 40, in <module>
ImportError: No module named DAV

The CalDAV module has document_webdav dependency. Checking line 40 in webdav.py shows:

35: try:
36:     from pywebdav.lib import utils
37:     from pywebdav.lib.propfind import PROPFIND
38:     from pywebdav.lib.report import REPORT
39: except ImportError:
40:     from DAV import utils
41:     from DAV.propfind import PROPFIND
42:     from DAV.report import REPORT

So I tried to install DAV for Python. Which failed: module not found.

Next I treid to install PyWebDav for Python. Success. For both version 2.7 and 3.3.

Trying to install my CalDAV module threw the same error.

Opening Python console and importing pywebdav works for both versions. "from pywebdav.lib import utils" works for 2.7 and fails for 3.3 ...
So I naively thought my OpenERP server would use python 3.3 instead of 2.7 ...

After Med Said BARA's answer I checked my openerp/server folder. pywebdav 0.9.8 module is existing. But yet the quoted try/except block from above tries to import DAV... Why?

 

UPDATE:

Installed PyDAV for python 2.7.

Copied the new module "WebDAV" to my openerp/server folder.

Still the same ImportError on module installation. Since the module is 'WebDAV' not 'DAV'. And WebDAV has no utils, REPORT, PROPFIND anyway...

 

UPDATE:

I think I finally understand the quoted try-except-block. The try is for pywebdav 0.9.8 while the except is for older pywebdav versions, that have the DAV / DAVSERVER folder structure, instead of the lib.

But still, I have pywebdav 0.9.8 installed. It should work!

 

Thanks.

0
Awatar
Odrzuć
Med Said BARA

You must install PyDAV from https://pypi.python.org/pypi/PyDAV/0.21

René Schuster
Autor

Installed it. Didn't help.

Med Said BARA

Did you copied the DAV folder from Python27\Lib\site-packages\ to Program Files (x86)\OpenERP xx\server and restarted your server

René Schuster
Autor

There is no 'DAV' folder. Only a 'WebDAV' folder. I had restarted the server.

Med Said BARA

utils, report and propfind are there !!!

Med Said BARA

Another trick is to look under X:\Python27\Lib\site-packages\ if there are folders DAV or WebDAV with .......-py2.7.egg extension, open those folder, there you can find the DAV folder (copy this one)

Med Said BARA

Any progress?

Med Said BARA

In fact you can use DAV or Webdav till the files utils, report and propfind are there. Try to download PyWebDAV 0.9.4.1 packed with DAV and DAVSERVER folder) or PyWebDAV 0.9.8 (packed with pywebdav folder and lib and server subfolder): https://pypi.python.org/pypi/PyWebDAV/0.9.4.1 or https://pypi.python.org/pypi/PyWebDAV/0.9.8

Med Said BARA

Any progress ?

René Schuster
Autor

Your endurance is admirable. Thanks. As mentioned, I now have both, the PyWebDav 0.9.8 and WebDAV 0.21 module in my server folder. It's still not working.

Med Said BARA

is it the same error ?

René Schuster
Autor

yes

Med Said BARA

Very strange, but keep on and try with the 0.9.4.1 version, istall it and copy the two folders DAV and DAVSERVER to ...\Program Files (x86)\OpenERP xx\server

René Schuster
Autor

That worked. Since you already gave the answer to the original question (OpenERP uses its own installation of Python in the server folder) I will accept your answer. Thanks for you great help. But nonetheless I don't know why version 0.9.8 of pywebdav is not working...

Med Said BARA

I think there is something wrong in the webdav.py code. I will try to investigate further and keep you informed. Last thing, take a look at https://github.com/initOS/openerp-dav, maybe you will find it interesting (Do not use along with documant_webdav - Read the issue).

Awatar
Med Said BARA
Najlepsza odpowiedź

Under Windows OpenERP 7 use his own python 2.7, take a look under ../Program Files (x86)/OpenERPxx/server/.. (or where you have installed OpenERP).

 

Lines added after comment from René Schuster

This is probably due to a missing external dependency in OpenERP (a Python dependency).

What you should do: is to download The_related_Package for the Version 2.7 (preferably  a windows auto-install package - see at http://www.lfd.uci.edu/~gohlke/pythonlibs/ if you can find it or by using easy_install) and Install the package. After install you can find this package under X:\Python27\Lib\site-packages\ , copy "The_related_Package" folder from X:\Python27\Lib\site-packages\The_related_Package to Y:\Program Files (x86)\OpenERP xx\server\. This way OpenERp will find the external dependency when needed.

Let's resume:  I think that your PYTHONPATH variable is pointing to the 3.3 Python folder, you have to change it to point to the 2.7

Follow http://www.katsbits.com/tutorials/blender/python-path-variable.php

Reinstall PyDAV ..... and copy the DAV folder as described before

2
Awatar
Odrzuć
René Schuster
Autor

So under windows OpenERP always uses Python 2.7? But I get import errors on module installation that manually only occur with my Python 3.3.

Med Said BARA

Can you tell me more about the IMPORT ERROR ...

René Schuster
Autor

Thanks for your help. I have updated my question.

René Schuster
Autor

Just for clarification: As far as I can see now, OpenERP has nothing to do with any installed python. It installs and uses its own python. Concluding you don't need to have python installed to run an OpenERP server on WINDOWS. (btw: my environment variables contain the folders of both python versions)

Med Said BARA

Yes and No. Yes because it uses his own python, and No because you need to have python installed especially when we encounter an external python depency need (such in your case, with pywebdav), in this case we need to install this dependency in python first (for the same version 2.7 as in OpenERP) and after that copy it to .....openerp/server folder. You can have more than 2 python versions installed, but the PYTHONPATH var must point to only one!

Podoba Ci się ta dyskusja? Dołącz do niej!

Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!

Zarejestruj się
Powiązane posty Odpowiedzi Widoki Czynność
Which python version is recommended? Rozwiązane
v6.1 python version v7
Awatar
Awatar
Awatar
Awatar
3
mar 15
33200
Please define these Python Fetch types
python v7
Awatar
2
mar 24
28987
XmlHttpRequestError in web-client when connecting via IP Rozwiązane
windows v7
Awatar
Awatar
Awatar
Awatar
Awatar
7
gru 23
32313
How add a float to a Datetime field.
python v7
Awatar
Awatar
Awatar
Awatar
3
mar 15
9657
How is the All-in-one Windows installer built from source?
windows v7
Awatar
Awatar
1
mar 15
6602
Społeczność
  • Samouczki
  • Dokumentacja
  • Forum
Open Source
  • Pobierz
  • Github
  • Runbot
  • Tłumaczenia
Usługi
  • Hosting Odoo.sh
  • Wsparcie
  • Aktualizacja
  • Indywidualne rozwiązania
  • Edukacja
  • Znajdź księgowego
  • Znajdź partnera
  • Zostań partnerem
O nas
  • Nasza firma
  • Zasoby marki
  • Skontaktuj się z nami
  • Oferty pracy
  • Wydarzenia
  • Podcast
  • Blog
  • Klienci
  • Informacje prawne • Prywatność
  • Bezpieczeństwo Odoo
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo to pakiet aplikacji biznesowych typu open source, które zaspokoją wszystkie potrzeby Twojej firmy: CRM, eCommerce, księgowość, inwentaryzacja, punkt sprzedaży, zarządzanie projektami itp.

Unikalną wartością Odoo jest to, że jest jednocześnie bardzo łatwe w użyciu i w pełni zintegrowane.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now