gpt4 book ai didi

python - 路径 '%s' 不能是绝对路径"% 路径名

转载 作者:太空宇宙 更新时间:2023-11-03 10:54:50 27 4
gpt4 key购买 nike

我正在尝试使用 pip 为 python 3 安装 Gelatin,我得到了这个回溯:

Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\abejd\AppData\Local\Temp\pip-build-u3685bna\SimpleParse\setup.py", line 108, in <module>
**extraArguments
File "c:\python36-32\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\python36-32\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "c:\python36-32\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Python27\Lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "c:\python36-32\lib\distutils\command\install.py", line 557, in run
self.run_command(cmd_name)
File "c:\python36-32\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\python36-32\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Python27\Lib\site-packages\setuptools\command\install_egg_info.py", line 34, in run
self.run_command('egg_info')
File "c:\python36-32\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\python36-32\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Python27\Lib\site-packages\setuptools\command\egg_info.py", line 279, in run
self.find_sources()
File "C:\Python27\Lib\site-packages\setuptools\command\egg_info.py", line 306, in find_sources
mm.run()
File "C:\Python27\Lib\site-packages\setuptools\command\egg_info.py", line 533, in run
self.add_defaults()
File "C:\Python27\Lib\site-packages\setuptools\command\egg_info.py", line 569, in add_defaults
self.read_manifest()
File "C:\Python27\Lib\site-packages\setuptools\command\sdist.py", line 201, in read_manifest
self.filelist.append(line)
File "C:\Python27\Lib\site-packages\setuptools\command\egg_info.py", line 475, in append
path = convert_path(item)
File "c:\python36-32\lib\distutils\util.py", line 125, in convert_path
raise ValueError("path '%s' cannot be absolute" % pathname)
ValueError: path '/home/mcfletch/OpenGL-dev/simpleparse/simpleparse/stt/TextTools/mxTextTools/mxTextTools.c' cannot be absolute

我已经尝试了 2 种解决方案,但都没有解决问题。如果我可以提供任何其他信息来尝试解决此问题,请告诉我。提前致谢!

最佳答案

我对 pg-chameleon 有类似的问题,由 setup.py 中的这一行引起:

conf_dir = "/%s/pg_chameleon/configuration" % python_lib
conn_dir = "/%s/pg_chameleon/connection" % python_lib
sql_dir = "/%s/pg_chameleon/sql" % python_lib
sql_up_dir = "/%s/pg_chameleon/%s" % (python_lib, sql_up_path)

错误看起来像:

ValueError: path '/f:\work\pycharmprojects\virtualenvironments\mysql2psql\Lib\site-packages/pg_chameleon/configuration' cannot be absolute

我通过下载 pg_chameleon-2.0.10.tar.gz 并编辑 setup.py 解决了这个问题(我删除了 '%s' 之前的 '/')然后我做了:

pip install "path-to-my-package"

得到了

Successfully installed pg-chameleon-2.0.10

关于python - 路径 '%s' 不能是绝对路径"% 路径名,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43080203/

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