PYTHON ujson. ERROR: Could not build wheels for ujson which use PEP 517 and cannot be installed directly

10,607

Solution 1

there may be two issue in window

  1. if bit issue if you are installing in machine 32bit inplace of 64bit use this https://rasa.com/docs/rasa/user-guide/installation/#step-by-step-installation-guide

  2. ujson compatibility issue discussed here : https://github.com/ultrajson/ultrajson/issues/369

download your whl file from: https://www.lfd.uci.edu/~gohlke/pythonlibs/#ujson

a)pip install ujson-1.35-cp37-cp37m-win_amd64.whl

b)pip install rasa

Solution 2

Try uninstalling the current version of ujson

conda uninstall ujson

and try installing the ujson - 1.35

conda install ujson==1.35
Share:
10,607
Claudiu Remenyi
Author by

Claudiu Remenyi

Updated on June 28, 2022

Comments

  • Claudiu Remenyi
    Claudiu Remenyi almost 2 years

    I`m trying to install RASA framework on my Windows laptop using Poetry and build from source. Using pip wont help me as i was never able to install Tensorflow and it comes along with RASA.

    What i have done already:

    $ 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
    

    When the installation reach the point to install ujson this happens and the installation stops:

    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
    

    Probably I can could simply install Anaconda and get it done that way (tensorflow worked this way), however the project I want to build needs to be able to run outside of Anaconda at any given time.

    Can anyone help me please? By the way, i already installed latest Microsoft Visual C++ and build tools.

  • robin9029
    robin9029 almost 4 years
    try these steps rasa official 1) conda create --name installrasa python==3.7.6 2) activate installrasa 3) conda install ujson 4) conda install tensorflow 5) pip install rasa rasa init