jjzjj

python - Pip install functools 返回错误

coder 2024-06-14 原文

我正在尝试使用 pip 安装 functools。但我收到以下错误。

Collecting functools
  Using cached functools-0.5.tar.gz
Building wheels for collected packages: functools
  Running setup.py bdist_wheel for functools ... error
  Complete output from command c:\python35\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\TAUSEE~1\\AppData\\Local\\Temp\\pip-build-0gc470iw\\functools\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d C:\Users\TAUSEE~1\AppData\Local\Temp\tmpn0sob7vxpip-wheel- --python-tag cp35:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-3.5
  copying functools.py -> build\lib.win-amd64-3.5
  running build_ext
  building '_functools' extension
  creating build\temp.win-amd64-3.5
  creating build\temp.win-amd64-3.5\Release
  creating build\temp.win-amd64-3.5\Release\src
  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\python35\include -Ic:\python35\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\winrt" /Tcsrc\functools.c /Fobuild\temp.win-amd64-3.5\Release\src\functools.obj
  functools.c
  src\functools.c(43): warning C4013: 'Py_InitModule3' undefined; assuming extern returning int
  src\functools.c(43): warning C4047: '=': 'PyObject *' differs in levels of indirection from 'int'
  src\functools.c(45): warning C4033: 'init_functools' must return a value
  src\functools.c(49): warning C4033: 'init_functools' must return a value
  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\python35\include -Ic:\python35\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\winrt" /Tcsrc\compose.c /Fobuild\temp.win-amd64-3.5\Release\src\compose.obj
  compose.c
  src\compose.c(57): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
  src\compose.c(96): error C2039: 'ob_type': is not a member of 'compose'
  src\compose.c(44): note: see declaration of 'compose'
  src\compose.c(137): warning C4013: 'PyString_FromFormat' undefined; assuming extern returning int
  src\compose.c(138): warning C4013: 'PyString_AsString' undefined; assuming extern returning int
  src\compose.c(138): warning C4047: '=': 'PyObject *' differs in levels of indirection from 'int'
  src\compose.c(143): warning C4047: 'initializing': 'Py_ssize_t' differs in levels of indirection from 'char [8]'
  src\compose.c(143): warning C4113: 'destructor' differs in parameter lists from 'printfunc'
  src\compose.c(143): warning C4133: 'initializing': incompatible types - from 'destructor' to 'printfunc'
  src\compose.c(143): warning C4047: 'initializing': 'PyNumberMethods *' differs in levels of indirection from 'reprfunc'
  src\compose.c(143): warning C4113: 'ternaryfunc' differs in parameter lists from 'reprfunc'
  src\compose.c(143): warning C4047: 'initializing': 'const char *' differs in levels of indirection from 'unsigned long'
  src\compose.c(143): warning C4047: 'initializing': 'traverseproc' differs in levels of indirection from 'char *'
  src\compose.c(143): warning C4113: 'traverseproc' differs in parameter lists from 'inquiry'
  src\compose.c(143): warning C4113: 'PyObject *(__cdecl *)(PyObject *,PyObject *)' differs in parameter lists from 'descrsetfunc'
  src\compose.c(143): warning C4047: 'initializing': 'descrsetfunc' differs in levels of indirection from 'PyObject *(__cdecl *)(PyObject *,PyObject *)'
  src\compose.c(143): warning C4113: 'PyObject *(__cdecl *)(PyTypeObject *,PyObject *,PyObject *)' differs in parameter lists from 'freefunc'
  src\compose.c(143): warning C4047: 'initializing': 'freefunc' differs in levels of indirection from 'PyObject *(__cdecl *)(PyTypeObject *,PyObject *,PyObject *)'
  src\compose.c(143): warning C4133: 'initializing': incompatible types - from 'void (__cdecl *)(void *)' to 'inquiry'
  error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2

  ----------------------------------------
  Failed building wheel for functools
  Running setup.py clean for functools
Failed to build functools
Installing collected packages: functools
  Running setup.py install for functools ... error
    Complete output from command c:\python35\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\TAUSEE~1\\AppData\\Local\\Temp\\pip-build-0gc470iw\\functools\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\TAUSEE~1\AppData\Local\Temp\pip-z68u1oc7-record\install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.5
    copying functools.py -> build\lib.win-amd64-3.5
    running build_ext
    building '_functools' extension
    creating build\temp.win-amd64-3.5
    creating build\temp.win-amd64-3.5\Release
    creating build\temp.win-amd64-3.5\Release\src
    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\python35\include -Ic:\python35\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\winrt" /Tcsrc\functools.c /Fobuild\temp.win-amd64-3.5\Release\src\functools.obj
    functools.c
    src\functools.c(43): warning C4013: 'Py_InitModule3' undefined; assuming extern returning int
    src\functools.c(43): warning C4047: '=': 'PyObject *' differs in levels of indirection from 'int'
    src\functools.c(45): warning C4033: 'init_functools' must return a value
    src\functools.c(49): warning C4033: 'init_functools' must return a value
    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\python35\include -Ic:\python35\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\winrt" /Tcsrc\compose.c /Fobuild\temp.win-amd64-3.5\Release\src\compose.obj
    compose.c
    src\compose.c(57): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
    src\compose.c(96): error C2039: 'ob_type': is not a member of 'compose'
    src\compose.c(44): note: see declaration of 'compose'
    src\compose.c(137): warning C4013: 'PyString_FromFormat' undefined; assuming extern returning int
    src\compose.c(138): warning C4013: 'PyString_AsString' undefined; assuming extern returning int
    src\compose.c(138): warning C4047: '=': 'PyObject *' differs in levels of indirection from 'int'
    src\compose.c(143): warning C4047: 'initializing': 'Py_ssize_t' differs in levels of indirection from 'char [8]'
    src\compose.c(143): warning C4113: 'destructor' differs in parameter lists from 'printfunc'
    src\compose.c(143): warning C4133: 'initializing': incompatible types - from 'destructor' to 'printfunc'
    src\compose.c(143): warning C4047: 'initializing': 'PyNumberMethods *' differs in levels of indirection from 'reprfunc'
    src\compose.c(143): warning C4113: 'ternaryfunc' differs in parameter lists from 'reprfunc'
    src\compose.c(143): warning C4047: 'initializing': 'const char *' differs in levels of indirection from 'unsigned long'
    src\compose.c(143): warning C4047: 'initializing': 'traverseproc' differs in levels of indirection from 'char *'
    src\compose.c(143): warning C4113: 'traverseproc' differs in parameter lists from 'inquiry'
    src\compose.c(143): warning C4113: 'PyObject *(__cdecl *)(PyObject *,PyObject *)' differs in parameter lists from 'descrsetfunc'
    src\compose.c(143): warning C4047: 'initializing': 'descrsetfunc' differs in levels of indirection from 'PyObject *(__cdecl *)(PyObject *,PyObject *)'
    src\compose.c(143): warning C4113: 'PyObject *(__cdecl *)(PyTypeObject *,PyObject *,PyObject *)' differs in parameter lists from 'freefunc'
    src\compose.c(143): warning C4047: 'initializing': 'freefunc' differs in levels of indirection from 'PyObject *(__cdecl *)(PyTypeObject *,PyObject *,PyObject *)'
    src\compose.c(143): warning C4133: 'initializing': incompatible types - from 'void (__cdecl *)(void *)' to 'inquiry'
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2

我之前在安装 resampy 时遇到了这个错误,我通过安装 VS 构建工具解决了它。我还将 vcvarsal.bat 文件添加到变量路径,最终安装了 resampy。但是 functools 似乎没有安装。我也找不到轮子。我粘贴了执行 pip install functools 后得到的完整消息

我正在使用 python 3.5.3 win10 x64

在此问题上如有任何帮助,我们将不胜感激。

最佳答案

functools on python package index 的最后更新是从 2005 年开始的。 作为explained on this SO , 它从 python 2.7 开始就被包含在标准库中

关于python - Pip install functools 返回错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45434650/

有关python - Pip install functools 返回错误的更多相关文章

  1. python - 如何使用 Ruby 或 Python 创建一系列高音调和低音调的蜂鸣声? - 2

    关闭。这个问题是opinion-based.它目前不接受答案。想要改进这个问题?更新问题,以便editingthispost可以用事实和引用来回答它.关闭4年前。Improvethisquestion我想在固定时间创建一系列低音和高音调的哔哔声。例如:在150毫秒时发出高音调的蜂鸣声在151毫秒时发出低音调的蜂鸣声200毫秒时发出低音调的蜂鸣声250毫秒的高音调蜂鸣声有没有办法在Ruby或Python中做到这一点?我真的不在乎输出编码是什么(.wav、.mp3、.ogg等等),但我确实想创建一个输出文件。

  2. ruby-on-rails - Rails 常用字符串(用于通知和错误信息等) - 2

    大约一年前,我决定确保每个包含非唯一文本的Flash通知都将从模块中的方法中获取文本。我这样做的最初原因是为了避免一遍又一遍地输入相同的字符串。如果我想更改措辞,我可以在一个地方轻松完成,而且一遍又一遍地重复同一件事而出现拼写错误的可能性也会降低。我最终得到的是这样的:moduleMessagesdefformat_error_messages(errors)errors.map{|attribute,message|"Error:#{attribute.to_s.titleize}#{message}."}enddeferror_message_could_not_find(obje

  3. ruby - 为什么 4.1%2 使用 Ruby 返回 0.0999999999999996?但是 4.2%2==0.2 - 2

    为什么4.1%2返回0.0999999999999996?但是4.2%2==0.2。 最佳答案 参见此处:WhatEveryProgrammerShouldKnowAboutFloating-PointArithmetic实数是无限的。计算机使用的位数有限(今天是32位、64位)。因此计算机进行的浮点运算不能代表所有的实数。0.1是这些数字之一。请注意,这不是与Ruby相关的问题,而是与所有编程语言相关的问题,因为它来自计算机表示实数的方式。 关于ruby-为什么4.1%2使用Ruby返

  4. ruby-on-rails - 迷你测试错误 : "NameError: uninitialized constant" - 2

    我遵循MichaelHartl的“RubyonRails教程:学习Web开发”,并创建了检查用户名和电子邮件长度有效性的测试(名称最多50个字符,电子邮件最多255个字符)。test/helpers/application_helper_test.rb的内容是:require'test_helper'classApplicationHelperTest在运行bundleexecraketest时,所有测试都通过了,但我看到以下消息在最后被标记为错误:ERROR["test_full_title_helper",ApplicationHelperTest,1.820016791]test

  5. ruby - 检查字符串是否包含散列中的任何键并返回它包含的键的值 - 2

    我有一个包含多个键的散列和一个字符串,该字符串不包含散列中的任何键或包含一个键。h={"k1"=>"v1","k2"=>"v2","k3"=>"v3"}s="thisisanexamplestringthatmightoccurwithakeysomewhereinthestringk1(withspecialcharacterslike(^&*$#@!^&&*))"检查s是否包含h中的任何键的最佳方法是什么,如果包含,则返回它包含的键的值?例如,对于上面的h和s的例子,输出应该是v1。编辑:只有字符串是用户定义的。哈希将始终相同。 最佳答案

  6. ruby-on-rails - 如何在 Rails View 上显示错误消息? - 2

    我是rails的新手,想在form字段上应用验证。myviewsnew.html.erb.....模拟.rbclassSimulation{:in=>1..25,:message=>'Therowmustbebetween1and25'}end模拟Controller.rbclassSimulationsController我想检查模型类中row字段的整数范围,如果不在范围内则返回错误信息。我可以检查上面代码的范围,但无法返回错误消息提前致谢 最佳答案 关键是您使用的是模型表单,一种显示ActiveRecord模型实例属性的表单。c

  7. 使用 ACL 调用 upload_file 时出现 Ruby S3 "Access Denied"错误 - 2

    我正在尝试编写一个将文件上传到AWS并公开该文件的Ruby脚本。我做了以下事情:s3=Aws::S3::Resource.new(credentials:Aws::Credentials.new(KEY,SECRET),region:'us-west-2')obj=s3.bucket('stg-db').object('key')obj.upload_file(filename)这似乎工作正常,除了该文件不是公开可用的,而且我无法获得它的公共(public)URL。但是当我登录到S3时,我可以正常查看我的文件。为了使其公开可用,我将最后一行更改为obj.upload_file(file

  8. ruby-on-rails - 错误 : Error installing pg: ERROR: Failed to build gem native extension - 2

    我克隆了一个rails仓库,我现在正尝试捆绑安装背景:OSXElCapitanruby2.2.3p173(2015-08-18修订版51636)[x86_64-darwin15]rails-v在您的Gemfile中列出的或native可用的任何gem源中找不到gem'pg(>=0)ruby​​'。运行bundleinstall以安装缺少的gem。bundleinstallFetchinggemmetadatafromhttps://rubygems.org/............Fetchingversionmetadatafromhttps://rubygems.org/...Fe

  9. ruby - #之间? Cooper 的 *Beginning Ruby* 中的错误或异常 - 2

    在Cooper的书BeginningRuby中,第166页有一个我无法重现的示例。classSongincludeComparableattr_accessor:lengthdef(other)@lengthother.lengthenddefinitialize(song_name,length)@song_name=song_name@length=lengthendenda=Song.new('Rockaroundtheclock',143)b=Song.new('BohemianRhapsody',544)c=Song.new('MinuteWaltz',60)a.betwee

  10. ruby-on-rails - 每次我尝试部署时,我都会得到 - (gcloud.preview.app.deploy) 错误响应 : [4] DEADLINE_EXCEEDED - 2

    我是Google云的新手,我正在尝试对其进行首次部署。我的第一个部署是RubyonRails项目。我基本上是在关注thisguideinthegoogleclouddocumentation.唯一的区别是我使用的是我自己的项目,而不是他们提供的“helloworld”项目。这是我的app.yaml文件runtime:customvm:trueentrypoint:bundleexecrackup-p8080-Eproductionconfig.ruresources:cpu:0.5memory_gb:1.3disk_size_gb:10当我转到我的项目目录并运行gcloudprevie

随机推荐