jeffthibault / python-nostr

A Python library for Nostr
MIT License
274 stars 87 forks source link

Unable to install #88

Open statusquont opened 1 year ago

statusquont commented 1 year ago

Error output as follows:


C:\WINDOWS\system32>pip install nostr
Collecting nostr
  Using cached nostr-0.0.2-py3-none-any.whl (15 kB)
Collecting cffi>=1.15.0
  Using cached cffi-1.15.1.tar.gz (508 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [24 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\Users\Human\AppData\Local\Temp\pip-install-6ix_c9ru\cffi_4296967108f5410cb42a1e996713bfb2\setup.py", line 126, in <module>
          if sys.platform == "win32" and uses_msvc():
                                         ^^^^^^^^^^^
        File "C:\Users\Human\AppData\Local\Temp\pip-install-6ix_c9ru\cffi_4296967108f5410cb42a1e996713bfb2\setup.py", line 105, in uses_msvc
          return config.try_compile('#ifndef _MSC_VER\n#error "not MSVC"\n#endif')
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Python312\Lib\site-packages\setuptools\_distutils\command\config.py", line 224, in try_compile
          self._compile(body, headers, include_dirs, lang)
        File "C:\Python312\Lib\site-packages\setuptools\_distutils\command\config.py", line 129, in _compile
          self.compiler.compile([src], include_dirs=include_dirs)
        File "C:\Python312\Lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 344, in compile
          self.initialize()
        File "C:\Python312\Lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 253, in initialize
          vc_env = _get_vc_env(plat_spec)
                   ^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Python312\Lib\site-packages\setuptools\msvc.py", line 214, in msvc14_get_vc_env
          return _msvc14_get_vc_env(plat_spec)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Python312\Lib\site-packages\setuptools\msvc.py", line 168, in _msvc14_get_vc_env
          raise distutils.errors.DistutilsPlatformError(
      distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

C:\WINDOWS\system32>

Thanks for any assistance!

weex commented 1 year ago

Looks like you need to install what's mentioned here in your error message.

Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/

pleb21 commented 1 year ago

would you be fine with this working on cloud - like google colab. It should work fine.