【问题标题】:ValueError: path 'conf/' cannot end with '/'ValueError: 路径 'conf/' 不能以 '/' 结尾
【发布时间】:2013-12-03 16:28:06
【问题描述】:

我在 Windows 7 上安装了 Python 2.6.6。 我正在尝试使用 pip 安装Graphite Tool。 但是当我运行命令时

pip install carbon

pip install graphite-web

我收到一个错误

ValueError: path 'conf/' cannot end with '/'

ValueError: path 'distro/' cannot end with '/'

第二个命令。

我该如何解决这个问题?

更新: 完整跟踪:

reading manifest template 'MANIFEST.in'

warning: manifest_maker: standard file '-c' not found

Traceback (most recent call last):

  File "<string>", line 16, in <module>

  File "c:\users\user\appdata\local\temp\pip_build_user\graphite-web\setup.py", line 64, in <module>

    **setup_kwargs

  File "C:\Python26\lib\distutils\core.py", line 152, in setup

    dist.run_commands()

  File "C:\Python26\lib\distutils\dist.py", line 975, in run_commands

    self.run_command(cmd)

  File "C:\Python26\lib\distutils\dist.py", line 995, in run_command

    cmd_obj.run()

  File "<string>", line 14, in replacement_run

  File "build\bdist.win-amd64\egg\setuptools\command\egg_info.py", line 230, in find_sources

  File "build\bdist.win-amd64\egg\setuptools\command\egg_info.py", line 298, in run

  File "build\bdist.win-amd64\egg\setuptools\command\sdist.py", line 116, in __read_template_hack

  File "C:\Python26\lib\distutils\command\sdist.py", line 336, in read_template

    self.filelist.process_template_line(line)

  File "C:\Python26\lib\distutils\filelist.py", line 129, in process_template_line

    (action, patterns, dir, dir_pattern) = self._parse_template_line(line)

  File "C:\Python26\lib\distutils\filelist.py", line 104, in _parse_template_line

    dir = convert_path(words[1])

  File "C:\Python26\lib\distutils\util.py", line 201, in convert_path

    raise ValueError, "path '%s' cannot end with '/'" % pathname

ValueError: path 'distro/' cannot end with '/'

【问题讨论】:

  • 错误发生在哪里?
  • 请提供错误的完整追溯
  • 似乎是linux/windows路径差异的问题。在 windows 中路径不能以 '/' 结尾,而在 linux 中它会以那个结尾。

标签: python pip graphite


【解决方案1】:

setup.py 文件中,请从包行中删除“/”。 Windows 会出现此问题。

以前的语法:

package_data={'distro': ['distro/','conf/']},

新语法:

package_data={'distro': ['distro','conf']},

【讨论】:

    猜你喜欢
    • 2021-02-28
    • 2021-08-27
    • 2015-06-30
    • 1970-01-01
    • 2020-05-02
    • 1970-01-01
    • 2017-03-29
    • 2019-12-31
    • 1970-01-01
    相关资源
    最近更新 更多