google / jsonnet

Jsonnet - The data templating language
http://jsonnet.org
Apache License 2.0
6.94k stars 437 forks source link

jsonnet install error on windows (python) #795

Open alikabeer32 opened 4 years ago

alikabeer32 commented 4 years ago
pip install jsonnet
Collecting jsonnet
  Using cached jsonnet-0.15.0.tar.gz (255 kB)
Building wheels for collected packages: jsonnet
  Building wheel for jsonnet (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: 'D:\anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Ali\\AppData\\Local\\Temp\\pip-install-9ry3yejf\\jsonnet\\setup.py'"'"'; __file__='"'"'C:\\Users\\Ali\\AppData\\Local\\Temp\\pip-install-9ry3yejf\\jsonnet\\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\Ali\AppData\Local\Temp\pip-wheel-x76d8i0p'
       cwd: C:\Users\Ali\AppData\Local\Temp\pip-install-9ry3yejf\jsonnet\
  Complete output (4 lines):
  running bdist_wheel
  running build
  running build_ext
  error: [WinError 2] The system cannot find the file specified
  ----------------------------------------
  ERROR: Failed building wheel for jsonnet
  Running setup.py clean for jsonnet
Failed to build jsonnet
Installing collected packages: jsonnet
    Running setup.py install for jsonnet ... error
    ERROR: Command errored out with exit status 1:
     command: 'D:\anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Ali\\AppData\\Local\\Temp\\pip-install-9ry3yejf\\jsonnet\\setup.py'"'"'; __file__='"'"'C:\\Users\\Ali\\AppData\\Local\\Temp\\pip-install-9ry3yejf\\jsonnet\\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\Ali\AppData\Local\Temp\pip-record-o038dpdq\install-record.txt' --single-version-externally-managed --compile --install-headers 'D:\anaconda3\Include\jsonnet'
         cwd: C:\Users\Ali\AppData\Local\Temp\pip-install-9ry3yejf\jsonnet\
    Complete output (4 lines):
    running install
    running build
    running build_ext
    error: [WinError 2] The system cannot find the file specified
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'D:\anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Ali\\AppData\\Local\\Temp\\pip-install-9ry3yejf\\jsonnet\\setup.py'"'"'; __file__='"'"'C:\\Users\\Ali\\AppData\\Local\\Temp\\pip-install-9ry3yejf\\jsonnet\\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\Ali\AppData\Local\Temp\pip-record-o038dpdq\install-record.txt' --single-version-externally-managed --compile --install-headers 'D:\anaconda3\Include\jsonnet' Check the logs for full command output.

Using conda:

conda install -c conda-forge jsonnet
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.

PackagesNotFoundError: The following packages are not available from current channels:

  - jsonnet

Current channels:

  - https://conda.anaconda.org/conda-forge/win-64
  - https://conda.anaconda.org/conda-forge/noarch
  - https://repo.anaconda.com/pkgs/main/win-64
  - https://repo.anaconda.com/pkgs/main/noarch
  - https://repo.anaconda.com/pkgs/r/win-64
  - https://repo.anaconda.com/pkgs/r/noarch
  - https://repo.anaconda.com/pkgs/msys2/win-64
  - https://repo.anaconda.com/pkgs/msys2/noarch

To search for alternate channels that may provide the conda package you're
looking for, navigate to

    https://anaconda.org

and use the search bar at the top of the page.
fralik commented 4 years ago

See #734 .

Toilal commented 3 years ago

https://github.com/mcovalt/jsonnetbin just works and seems damn simple. Please take a look at this repository and include the setup.py configuration inside the official project.

shamsuddinladha commented 3 years ago

As @Toilal commented use jsonnet-binary. For me, pip install jsonnet-binary fixed the issue.

ft3020997 commented 3 years ago

As @Toilal commented use jsonnet-binary. For me, pip install jsonnet-binary fixed the issue.

It works for my issue on Windows Envs. Thx!

mauvilsa commented 3 weeks ago

@Toilal jsonnet-binary fails to install on windows for python v3.13.0-rc.1, with _jsonnet.obj : error LNK2001: unresolved external symbol PyEval_CallObject. Will there be a new jsonnet-binary release that works on python 3.13?

I have also seen that @johnbartholomew merged #1137 which seems to fix windows builds here in the official repo, being actually preferable than jsonnet-binary. Though, I see that jsonnet doesn't release often, the last being v0.20.0, more than a year ago, 17 April 2023. Will there be a jsonnet release that builds on windows by the time that the final python v3.13 comes out?

mauvilsa commented 1 week ago

Just for reference, some time after my comment above, I create a specific issue https://github.com/google/jsonnet/issues/1172