gpt4 book ai didi

python - 在 zc.buildout 中安装私有(private) python lib 时 Marshall 数据错误

转载 作者:行者123 更新时间:2023-12-01 05:00:35 25 4
gpt4 key购买 nike

在为我的一个项目安装依赖项时,我遇到了错误的编码数据错误。如果我们使用标准 virtualenv 安装,它可以正常工作,不会出现错误。

这是我的 zc.buildout 的一部分(目前导致错误的部分已被注释掉):

[buildout]
versions = versions
extensions = mr.developer
unzip = true
include-site-packages = false

# FIXME
# Attempting to install from here via buildout raises a bad marshal data error
# I should note that this errors does _not_ occur when we install in a
# clean virtual environment. It only happens in buildout.
# find-links = https://<myuser>:<mypass>@www.reportlab.com/pypi/simple/rlextra/

# Temporary solution, we included the package manually and will add it as
# a develop egg, then in the "django" part further down, we need to
# include the package in the extra-paths.
develop = ${buildout:directory}/libs/rlextra-3.1.9

回溯:

Getting distribution for 'rlextra==3.1.9'.
zip_safe flag not set; analyzing archive contents...
rlextra.thirdparty.xlrd.xlsx: module references __file__
rlextra.utils.buildutils: module references __file__
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 1973, in main

File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 1954, in with_ei_usage

File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 1977, in <lambda>

File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 360, in run

File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 584, in easy_install

File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 634, in install_item

File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 829, in install_eggs

File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 1109, in build_and_install

File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 1095, in run_setup

File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line 33, in run_setup
File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line 81, in run
File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line 35, in <lambda>
File "setup.py", line 78, in <module>
File "setup.py", line 73, in main
File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "build/bdist.linux-x86_64/egg/setuptools/command/bdist_egg.py", line 227, in run
File "build/bdist.linux-x86_64/egg/setuptools/command/bdist_egg.py", line 266, in zip_safe
File "build/bdist.linux-x86_64/egg/setuptools/command/bdist_egg.py", line 402, in analyze_egg
File "build/bdist.linux-x86_64/egg/setuptools/command/bdist_egg.py", line 433, in scan_module
ValueError: bad marshal data (unknown type code)
An error occured when trying to install rlextra 3.1.9. Look above this message for any errors that were output by easy_install.

有谁知道可能导致此问题的原因以及如何解决它。我们目前通过手动下载并包含软件包(如您在构建配置中看到的)来管理此问题,这并不理想。

最佳答案

我认为这可能与我们用来混淆被认为是专有的文件的方式有关。直到 3 个月前,我们希望隐藏的模块都以原始 pyc 文件的形式传输,并带有表示其 python 版本的后缀,例如 rml2pdf_27.pyc、rml2pdf_33.pyc 等。

现在我们传输一个包含嵌入式编译代码作为数据的 python 文件,因此打包者现在不应该看到它。该更改发生在 3.1.9 创建后。

关于python - 在 zc.buildout 中安装私有(private) python lib 时 Marshall 数据错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26294766/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com