• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

building'fdfs_client.sendfile'extensionerror:MicrosoftVisualC++14.0isrequired.Ge ...

原作者: [db:作者] 来自: [db:来源] 收藏 邀请
(env) D:\python_learn\meiduo_project>pip install fdfs_client-py-master.zip
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Processing d:\python_learn\meiduo_project\fdfs_client-py-master.zip
Building wheels for collected packages: fdfs-client-py
  Building wheel for fdfs-client-py (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: 'D:\python_learn\meiduo_project\env\Scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\sewen\\AppData\\Local\\Temp\\pip-req-build-9rb
op60k\\setup.py'"'"'; __file__='"'"'C:\\Users\\sewen\\AppData\\Local\\Temp\\pip-req-build-9rbop60k\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().repla
ce('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\sewen\AppData\Local\Temp\pip-wheel-wftmipvi'
       cwd: C:\Users\sewen\AppData\Local\Temp\pip-req-build-9rbop60k\
  Complete output (23 lines):
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "C:\Users\sewen\AppData\Local\Temp\pip-req-build-9rbop60k\setup.py", line 37, in <module>
      setup(**sdict)
    File "D:\python_learn\meiduo_project\env\lib\site-packages\setuptools\__init__.py", line 165, in setup
      return distutils.core.setup(**attrs)
    File "D:\Python\Python38\lib\distutils\core.py", line 134, in setup
      ok = dist.parse_command_line()
    File "D:\Python\Python38\lib\distutils\dist.py", line 483, in parse_command_line
      args = self._parse_command_opts(parser, args)
    File "D:\python_learn\meiduo_project\env\lib\site-packages\setuptools\dist.py", line 929, in _parse_command_opts
      nargs = _Distribution._parse_command_opts(self, parser, args)
    File "D:\Python\Python38\lib\distutils\dist.py", line 539, in _parse_command_opts
      cmd_class = self.get_command_class(command)
    File "D:\python_learn\meiduo_project\env\lib\site-packages\setuptools\dist.py", line 768, in get_command_class
      self.cmdclass[command] = cmdclass = ep.load()
    File "D:\python_learn\meiduo_project\env\lib\site-packages\pkg_resources\__init__.py", line 2461, in load
      return self.resolve()
    File "D:\python_learn\meiduo_project\env\lib\site-packages\pkg_resources\__init__.py", line 2467, in resolve
      module = __import__(self.module_name, fromlist=['__name__'], level=0)
    File "D:\python_learn\meiduo_project\env\lib\site-packages\wheel\bdist_wheel.py", line 13, in <module>
      from qqemail.generator import Generator
  ModuleNotFoundError: No module named 'qqemail'
  ----------------------------------------
  ERROR: Failed building wheel for fdfs-client-py
  Running setup.py clean for fdfs-client-py
Failed to build fdfs-client-py
Installing collected packages: fdfs-client-py
    Running setup.py install for fdfs-client-py ... error
    ERROR: Command errored out with exit status 1:
     command: 'D:\python_learn\meiduo_project\env\Scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\sewen\\AppData\\Local\\Temp\\pip-req-build-9
rbop60k\\setup.py'"'"'; __file__='"'"'C:\\Users\\sewen\\AppData\\Local\\Temp\\pip-req-build-9rbop60k\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().rep
lace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\sewen\AppData\Local\Temp\pip-record-6cn1p_it\install-record.txt' -
-single-version-externally-managed --compile --install-headers 'D:\python_learn\meiduo_project\env\include\site\python3.8\fdfs-client-py'
         cwd: C:\Users\sewen\AppData\Local\Temp\pip-req-build-9rbop60k\
    Complete output (18 lines):
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.8
    creating build\lib.win-amd64-3.8\fdfs_client
    copying fdfs_client\client.py -> build\lib.win-amd64-3.8\fdfs_client
    copying fdfs_client\connection.py -> build\lib.win-amd64-3.8\fdfs_client
    copying fdfs_client\exceptions.py -> build\lib.win-amd64-3.8\fdfs_client
    copying fdfs_client\fdfs_protol.py -> build\lib.win-amd64-3.8\fdfs_client
    copying fdfs_client\fdfs_test.py -> build\lib.win-amd64-3.8\fdfs_client
    copying fdfs_client\storage_client.py -> build\lib.win-amd64-3.8\fdfs_client
    copying fdfs_client\tracker_client.py -> build\lib.win-amd64-3.8\fdfs_client
    copying fdfs_client\utils.py -> build\lib.win-amd64-3.8\fdfs_client
    copying fdfs_client\__init__.py -> build\lib.win-amd64-3.8\fdfs_client
    running build_ext
    building 'fdfs_client.sendfile' extension
    error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'D:\python_learn\meiduo_project\env\Scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\sewen\\AppD
ata\\Local\\Temp\\pip-req-build-9rbop60k\\setup.py'"'"'; __file__='"'"'C:\\Users\\sewen\\AppData\\Local\\Temp\\pip-req-build-9rbop60k\\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\sewen\AppData\Local\Temp\pip-reco
rd-6cn1p_it\install-record.txt' --single-version-externally-managed --compile --install-headers 'D:\python_learn\meiduo_project\env\include\site\python3.8\fdfs-client-py' Check the logs
 for full command output.

 

windows安装fdfs_client-py-master.zip 出现 error: Microsoft Visual C++ 14.0 is required.
在学习django+fdfs+nginx时碰见的问题,笔记本电脑的虚拟机ubuntu实在卡到怀疑人生,所以django装在windows,ubuntu只开启fdfs+nginx服务。于是就有在windows下安装fdfs client的需求,先提醒一下,有条件还是在linux下学习开发好~

下载 fdfs_client-py-master.zip 并 pip install fdfs_client-py-master.zip时报错
报错信息:
error: Microsoft Visual C++ 14.0 is required
这时到控制面板确认此程序已安装,或者已安装Microsoft Visual C++ 2005等 。
那么问题不是因为 版本不正确
经过百度,看论坛等方式发现错误原因是因为在windows安装fdfs_client 需要注释或者删除一些代码

解决方法
1.解压以下载的fdfs_client-py-master到任意位置,打开fdfs_client 目录下的storage_client.py文件
屏蔽第12行 # from fdfs_client.sendfile import *

2.解压后的fdfs_client-py-master 目录下的setup.py
屏蔽sdict字典中的 ‘ext_modules’

 

 

3.在将注释过的fdfs_client-py-master文件压缩成压缩文件,格式应为.zip
4.在pip install fdfs_client-py-master.zip 之前必须确保你的虚拟环境中以安装mutagen 和 requests,如果没有请先导入

pip install mutagen 
pip install requests

5.在到你的fdfs_client-py-master.zip压缩包目录下导入即可成功运行

pip install fdfs_client-py-master.zip

显示安装成功

 


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C#中DataTable与泛型集合互转(支持泛型集合中对象包含枚举)发布时间:2022-07-13
下一篇:
qml:C++调用qml函数发布时间:2022-07-13
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap