aburrell / apexpy

A Python wrapper for Apex coordinates
MIT License
34 stars 25 forks source link

Question: Unable to install apexpy #95

Closed SanaShaukat closed 2 years ago

SanaShaukat commented 2 years ago
    File "C:\Users\shau_sa\AppData\Local\Temp\pip-build-env-p83bbqlm\overlay\Lib\site-packages\setuptools\command\editable_wheel.py", line 140, in run
      self._create_wheel_file(bdist_wheel)
    File "C:\Users\shau_sa\AppData\Local\Temp\pip-build-env-p83bbqlm\overlay\Lib\site-packages\setuptools\command\editable_wheel.py", line 330, in _create_wheel_file
      files, mapping = self._run_build_commands(dist_name, unpacked, lib, tmp)
    File "C:\Users\shau_sa\AppData\Local\Temp\pip-build-env-p83bbqlm\overlay\Lib\site-packages\setuptools\command\editable_wheel.py", line 261, in _run_build_commands
      self._run_build_subcommands()
    File "C:\Users\shau_sa\AppData\Local\Temp\pip-build-env-p83bbqlm\overlay\Lib\site-packages\setuptools\command\editable_wheel.py", line 288, in _run_build_subcommands
      self.run_command(name)
    File "C:\Users\shau_sa\AppData\Local\Temp\pip-build-env-p83bbqlm\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 319, in run_command
      self.distribution.run_command(command)
    File "C:\Users\shau_sa\AppData\Local\Temp\pip-build-env-p83bbqlm\overlay\Lib\site-packages\setuptools\dist.py", line 1217, in run_command
      super().run_command(command)
    File "C:\Users\shau_sa\AppData\Local\Temp\pip-build-env-p83bbqlm\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 987, in run_command
      cmd_obj.run()
    File "C:\Users\shau_sa\AppData\Local\Temp\pip-build-env-p83bbqlm\overlay\Lib\site-packages\numpy\distutils\command\build_ext.py", line 163, in run
      self.compiler_opt = new_ccompiler_opt(
    File "C:\Users\shau_sa\AppData\Local\Temp\pip-build-env-p83bbqlm\overlay\Lib\site-packages\numpy\distutils\ccompiler_opt.py", line 2652, in new_ccompiler_opt
      opt = CCompilerOpt(compiler, **kwargs)
    File "C:\Users\shau_sa\AppData\Local\Temp\pip-build-env-p83bbqlm\overlay\Lib\site-packages\numpy\distutils\ccompiler_opt.py", line 2210, in __init__
      _CCompiler.__init__(self)
    File "C:\Users\shau_sa\AppData\Local\Temp\pip-build-env-p83bbqlm\overlay\Lib\site-packages\numpy\distutils\ccompiler_opt.py", line 1062, in __init__
      if self.cc_test_flags([f]):
    File "C:\Users\shau_sa\AppData\Local\Temp\pip-build-env-p83bbqlm\overlay\Lib\site-packages\numpy\distutils\ccompiler_opt.py", line 901, in cache_wrap_me
      ccb = cb(self, *args, **kwargs)
    File "C:\Users\shau_sa\AppData\Local\Temp\pip-build-env-p83bbqlm\overlay\Lib\site-packages\numpy\distutils\ccompiler_opt.py", line 1075, in cc_test_flags
      test = self.dist_test(test_path, flags)
    File "C:\Users\shau_sa\AppData\Local\Temp\pip-build-env-p83bbqlm\overlay\Lib\site-packages\numpy\distutils\ccompiler_opt.py", line 625, in dist_test
      self.dist_compile(
    File "C:\Users\shau_sa\AppData\Local\Temp\pip-build-env-p83bbqlm\overlay\Lib\site-packages\numpy\distutils\ccompiler_opt.py", line 607, in dist_compile
      return ccompiler.compile(sources, extra_postargs=flags, **kwargs)
    File "C:\Users\shau_sa\AppData\Local\Temp\pip-build-env-p83bbqlm\overlay\Lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 344, in compile
      self.initialize()
    File "C:\Users\shau_sa\AppData\Local\Temp\pip-build-env-p83bbqlm\overlay\Lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 253, in initialize
      vc_env = _get_vc_env(plat_spec)
    File "C:\Users\shau_sa\AppData\Local\Temp\pip-build-env-p83bbqlm\overlay\Lib\site-packages\setuptools\msvc.py", line 214, in msvc14_get_vc_env
      return _msvc14_get_vc_env(plat_spec)
    File "C:\Users\shau_sa\AppData\Local\Temp\pip-build-env-p83bbqlm\overlay\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/
  INFO: CCompilerOpt.cache_flush[857] : write cache to path -> C:\Users\shau_sa\AppData\Local\Temp\tmphj_bh82n.build-temp\Release\ccompiler_opt_cache_ext.py
  error: Support for editable installs via PEP 660 was recently introduced
  in `setuptools`. If you are seeing this error, please report to:

  https://github.com/pypa/setuptools/issues

  Meanwhile you can try the legacy behavior by setting an
  environment variable and trying to install again:

  SETUPTOOLS_ENABLE_FEATURES="legacy-editable"
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building editable for apexpy Failed to build apexpy ERROR: Could not build wheels for apexpy, which is required to install pyproject.toml-based projects

Expectations being able to install and run apexpy

Desktop

Additional context I have tried installing visual studio build tools version 17.3.6. and also numpy and scipy. but the problem is still there.

aburrell commented 2 years ago

The error is showing Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools". This can happen if you don't have the build tools, if you don't have a fortran compiler, or if you didn't install them in the correct order. If you have a fortran compiler and you're getting this error I would recommend:

1) Uninstalling it 2) Installing Microsoft Visual C++ 14.0 3) Re-installing the compiler (e.g., MinGW).