【问题标题】:Argument error while installing virtualenvwrapper-powershell安装 virtualenvwrapper-powershell 时出现参数错误
【发布时间】:2015-10-02 09:58:27
【问题描述】:

尝试安装 virtualenvwrapper-powershell 但出现以下错误:

chown() missing 1 required positional argument: 'numeric_owner' 

看完这篇文章我明白了:

https://bitbucket.org/guillermooo/virtualenvwrapper-powershell/issues/5/cant-install-package-with-python3-and-pip

(实际上我在其中描述了一个问题) 名叫 Alexander Zonov 的人建议:

我们已经有了解决方案。下载 virtualenvwrapper-powershell 查找 文件 setup.py 将问题字符串更改为这个 TOKEN_READ = 0x00020000 | 0x0008 使用“python setup.py install”命令安装 virtualenvwrapper-powershell

完成后我得到了我的错误:

Traceback (most recent call last):
  File "C:\Python35\virtualenvwrapper-powershell-12.7.8\distribute_setup.py", line 143, in use_setuptools
    raise ImportError
ImportError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "setup.py", line 11, in <module>
    distribute_setup.use_setuptools()
  File "C:\Python35\virtualenvwrapper-powershell-12.7.8\distribute_setup.py", line 145, in use_setuptools
    return _do_download(version, download_base, to_dir, download_delay)
  File "C:\Python35\virtualenvwrapper-powershell-12.7.8\distribute_setup.py", line 125, in _do_download

    _build_egg(egg, tarball, to_dir)
  File "C:\Python35\virtualenvwrapper-powershell-12.7.8\distribute_setup.py", line 99, in _build_egg
    _extractall(tar)
  File "C:\Python35\virtualenvwrapper-powershell-12.7.8\distribute_setup.py", line 459, in _extractall
    self.chown(tarinfo, dirpath)
TypeError: chown() missing 1 required positional argument: 'numeric_owner'

任何提示我该如何解决这个问题?

【问题讨论】:

    标签: python powershell virtualenv


    【解决方案1】:

    转到“distribute_setup.py”中的第 459 行并尝试添加一个空参数,如下所示:chown(tarinfo, dirpath, '');

    为我工作。

    我确信这不是一个完美的解决方案,但它有点像 quickfix。不过帮了我。

    【讨论】:

    • 为我工作。在 ex_setup.py 中,从 'self.chown(tarinfo, dirpath)' 更改为 'self.chown(tarinfo, dirpath, '')' 有效。爱你。
    猜你喜欢
    • 1970-01-01
    • 2018-01-30
    • 2014-02-09
    • 2014-09-01
    • 1970-01-01
    • 1970-01-01
    • 2017-02-01
    • 2017-11-06
    • 2013-01-24
    相关资源
    最近更新 更多