我正在尝试在windows上安装odoo,这是Lastes步骤。从站点克隆git
pip install-r requirements.txt
python python odoo-bin-r odoo-w y2000--插件路径=插件-d mydb然后这个错误:
`
Traceback (most recent call last):
File "odoo-bin", line 5, in <module>
import odoo
File "C:odoocomunityodooodoo__init__.py", line 113, in <module>
from . import modules
File "C:odoocomunityodooodoomodules__init__.py", line 8, in <module>
from . import db, graph, loading, migration, module, registry
File "C:odoocomunityodooodoomodulesgraph.py", line 10, in <module>
import odoo.tools as tools
File "C:odoocomunityodooodootools__init__.py", line 10, in <module>
from . import cloc
File "C:odoocomunityodooodootoolscloc.py", line 10, in <module>
from odoo.tools.config import config
File "C:odoocomunityodooodootoolsconfig.py", line 18, in <module>
from passlib.context import CryptContext
File "C:UsersYazidAppDataLocalProgramsPythonPython38libsite-packagespasslibcontext.py", line 15, in <module>
from passlib.registry import get_crypt_handler, _validate_handler_name
File "C:UsersYazidAppDataLocalProgramsPythonPython38libsite-packagespasslibregistry.py", line 12, in <module>
from passlib.ifc import PasswordHash
File "C:UsersYazidAppDataLocalProgramsPythonPython38libsite-packagespasslibifc.py", line 10, in <module>
from passlib.utils.decor import deprecated_method
File "C:UsersYazidAppDataLocalProgramsPythonPython38libsite-packagespasslibutils__init__.py", line 846, in <module>
from time import clock as timer
ImportError: cannot import name 'clock' from 'time' (unknown location)
这是错误消息中提到的第846行代码的一部分
if sys.platform == "win32":
print(sys.platform)
# On Windows, the best timer is time.clock()
from time import clock as timer
else:
# On most other platforms the best timer is time.time()
from time import time as timer
# legacy alias, will be removed in passlib 2.0
tick = timer
从时间导入时钟作为计时器
由于时间模块的python 3.8时钟功能已经贬值。我想你已经用你的odoo配置了odoo 3.8。您需要配置odoo 3.7。您可以使用以下命令为python 3.7 创建一个新的virtualenv
路径\到\ python3.7-m venv myvenv
注意:您可能需要单独安装python 3.7。