odoo错误:安装脚本指定了绝对路径

时间:2018-10-19 17:49:46

标签: odoo odoo-10 setup.py

我正在尝试从github构建odoo 10.0并在运行setup.py后运行以下错误 错误:错误:安装脚本指定了绝对路径:     c:\ python27 \ lib \ site-packages \ babel \ global.dat 在Windows 7上,python 2.7.9和所有要求已由 pip -r requirements.txt

python setup.py build
running build
running build_py
running egg_info
writing requirements to odoo.egg-info\requires.txt
writing odoo.egg-info\PKG-INFO
writing top-level names to odoo.egg-info\top_level.txt
writing dependency_links to odoo.egg-info\dependency_links.txt
reading manifest file 'odoo.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.eml' under directory 'odoo'
warning: no files found matching '*.eot' under directory 'odoo'
warning: no files found matching '*.ico' under directory 'odoo'
warning: no files found matching '*.jpeg' under directory 'odoo'
warning: no files found matching '*.md' under directory 'odoo'
warning: no files found matching '*.mp3' under directory 'odoo'
warning: no files found matching '*.ogg' under directory 'odoo'
warning: no files found matching '*.otf' under directory 'odoo'
warning: no files found matching '*.pdf' under directory 'odoo'
warning: no files found matching '*.rst' under directory 'odoo'
warning: no files found matching '*.svg' under directory 'odoo'
warning: no files found matching '*.ttf' under directory 'odoo'
warning: no files found matching '*.woff' under directory 'odoo'
warning: no files found matching '*.woff2' under directory 'odoo'
warning: no files found matching '*.wsdl' under directory 'odoo'
warning: no files found matching '*.xsd' under directory 'odoo'
warning: no previously-included files matching '*.py[co]' found under directory
'*'
warning: no previously-included files matching '*.hg*' found under directory '*
writing manifest file 'odoo.egg-info\SOURCES.txt'
error: Error: setup script specifies an absolute path:
    c:\python27\lib\site-packages\babel\global.dat
setup() arguments must *always* be /-separated paths relative to the
setup.py directory, *never* absolute paths.

1 个答案:

答案 0 :(得分:1)

我在遇到同样的错误:

pip install https://nightly.odoo.com/11.0/nightly/src/odoo_11.0.latest.zip

我通过下载,提取和修复它:

setup.py模块中注释(在odoo文件夹行136内部)

include_package_data=True

并将odoo.egg-info / SOURCES.txt中的所有绝对路径替换为相对路径。

此后请勿使用:

pip install https://nightly.odoo.com/11.0/nightly/src/odoo_11.0.latest.zip

但是(在提取的odoo目录中)

python setup.py build

和/或

python setup.py install