首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >PYTHON ujson。错误:无法为使用PEP 517的ujson构建轮子,因此无法直接安装

PYTHON ujson。错误:无法为使用PEP 517的ujson构建轮子,因此无法直接安装
EN

Stack Overflow用户
提问于 2020-05-03 19:45:14
回答 2查看 9.6K关注 0票数 2

我正在尝试使用Poetry and build from source在我的Windows笔记本电脑上安装RASA框架。使用pip对我没有帮助,因为我从来没有安装过Tensorflow,而它是随RASA一起提供的。

我已经完成了以下工作:

代码语言:javascript
复制
$ curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python
$ git clone https://github.com/RasaHQ/rasa.git
$ cd rasa
$ poetry install

当安装到达安装ujson时,就会发生这种情况,并且安装会停止:

代码语言:javascript
复制
Collecting ujson
  Using cached ujson-2.0.3.tar.gz (7.1 MB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Installing backend dependencies: started
  Installing backend dependencies: finished with status 'done'
    Preparing wheel metadata: started
    Preparing wheel metadata: finished with status 'done'
Building wheels for collected packages: ujson
  Building wheel for ujson (PEP 517): started
  Building wheel for ujson (PEP 517): finished with status 'error'
  ERROR: Command errored out with exit status 1:
   command: 'c:\users\claudiu\appdata\local\programs\python\python38\python.exe' 'c:\users\claudiu\appdata\local\programs\python\python38\lib\site-packages\pip\_vendor\pep517\_in_process.py' build_wheel 'C:\Users\claudiu\AppData\Local\Temp\tmp3514zx41'
       cwd: C:\Users\claudiu\AppData\Local\Temp\pip-install-2qy6btub\ujson
  Complete output (16 lines):
  running bdist_wheel
  running build
  running build_ext
  building 'ujson' extension
  creating build
  creating build\temp.win-amd64-3.8
  creating build\temp.win-amd64-3.8\Release
  creating build\temp.win-amd64-3.8\Release\deps
  creating build\temp.win-amd64-3.8\Release\deps\double-conversion
  creating build\temp.win-amd64-3.8\Release\deps\double-conversion\double-conversion
  creating build\temp.win-amd64-3.8\Release\lib
  creating build\temp.win-amd64-3.8\Release\python
  C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -I./python -I./lib -I./deps/double-conversion/double-conversion -Ic:\users\claudiu\appdata\local\programs\python\python38\include -Ic:\users\claudiu\appdata\local\programs\python\python38\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\include" /EHsc /Tp./deps/double-conversion/double-conversion\bignum-dtoa.cc /Fobuild\temp.win-amd64-3.8\Release\./deps/double-conversion/double-conversion\bignum-dtoa.obj -D_GNU_SOURCE
  bignum-dtoa.cc
  ./deps/double-conversion/double-conversion\bignum-dtoa.cc(28): fatal error C1083: Cannot open include file: 'math.h': No such file or directory
  error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
  ----------------------------------------
  ERROR: Failed building wheel for ujson
Failed to build ujson
ERROR: Could not build wheels for ujson which use PEP 517 and cannot be installed directly

也许我可以简单地安装Anaconda并以这种方式完成(tensorflow以这种方式工作),但是我想要构建的项目需要能够在任何给定的时间在Anaconda之外运行。

有谁能帮帮我吗?顺便说一下,我已经安装了最新的Microsoft Visual C++和构建工具。

EN

回答 2

Stack Overflow用户

发布于 2020-08-03 23:55:22

window中可能存在两个问题

如果要在计算机上安装32位而不是64位,请使用此https://rasa.com/docs/rasa/user-guide/installation/#step-by-step-installation-guide来解决

  1. if位问题

此处讨论的

  1. ujson兼容性问题:https://github.com/ultrajson/ultrajson/issues/369

https://www.lfd.uci.edu/~gohlke/pythonlibs/#ujson下载你的whl文件

a)pip安装ujson-1.35-cp37-cp37m-win_amd64.whl

b)pip安装rasa

票数 5
EN

Stack Overflow用户

发布于 2020-07-16 00:03:21

尝试卸载当前版本的ujson

代码语言:javascript
复制
conda uninstall ujson

并尝试安装ujson - 1.35

代码语言:javascript
复制
conda install ujson==1.35
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/61573883

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档