Failled to install Obspy using VS code on Win 10

Hi all,
I have an issue when I try to install Obspy using the line command: “pip install obspy” in vs code
the error message is:

copying obspy\taup\tests\data\TauP_test_data\taup_path_-o_stdout_-h_10_-ph_P_-deg_35 → build\\obspy\taup\tests\data\TauP_test_data
copying obspy\taup\tests\data\TauP_test_data\taup_path_-o_stdout_-h_10_-ph_P_-deg_35_-mod_ak135 → build\\obspy\taup\tests\data\TauP_test_data
copying obspy\taup\tests\data\TauP_test_data\taup_pierce_-h_10_-ph_P_-deg_35 → build\\obspy\taup\tests\data\TauP_test_data
copying obspy\taup\tests\data\TauP_test_data\taup_pierce_-mod_isp91_ph_P_-h_10_-evt_-45_-50_-sta_-80_-50 → build\\obspy\taup\tests\data\TauP_test_data
copying obspy\taup\tests\data\TauP_test_data\taup_time_-h_10_-ph_P_-deg_35 → build\\obspy\taup\tests\data\TauP_test_data
copying obspy\taup\tests\data\TauP_test_data\taup_time_-h_10_-ph_P_-deg_35_-mod_ak135 → build\\obspy\taup\tests\data\TauP_test_data
copying obspy\taup\tests\data\TauP_test_data\taup_time_-h_10_-ph_P_-deg_35_-mod_ak135f_no_mud → build\\obspy\taup\tests\data\TauP_test_data
copying obspy\taup\tests\data\TauP_test_data\taup_time_-h_10_-ph_P_-deg_35_-mod_jb → build\\obspy\taup\tests\data\TauP_test_data
copying obspy\taup\tests\data\TauP_test_data\taup_time_-h_10_-ph_P_-deg_35_-mod_pwdk → build\\obspy\taup\tests\data\TauP_test_data
copying obspy\taup\tests\data\TauP_test_data\taup_time_-h_10_-ph_ttall_-deg_35 → build\\obspy\taup\tests\data\TauP_test_data
copying obspy\taup\tests\data\TauP_test_data\taup_time_-h_10_-ph_ttall_-deg_35_-mod_ak135 → build\\obspy\taup\tests\data\TauP_test_data
copying obspy\taup\tests\data\TauP_test_data\underside_reflections.txt → build\\obspy\taup\tests\data\TauP_test_data
running build_ext
building ‘gcf’ extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with “Microsoft C++ Build Tools”: Microsoft C++ Build Tools - Visual Studio
[end of output]

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

I’m running on the latest version of “Python 3.11.3” “numpy==1.24.3”

Can anyone help me with this issue?
Thank you.

Are you trying to make a developer installation from the latest github version? (I can’t help with that)

If not, you should consider using Anaconda distribution, which should work without problems and without need for compilation.

It’s not a developer installation.
So, I must use Anaconda distribution? Otherwise, it’s impossible to install the package.

Like mentioned in our wiki, we strongly recommend installation via Anaconda precompiled release packages for normal users:

In principle installation via pip should work too, but somehow there is no compiled package for Python 3.11 for Windows on pypi. Maybe there was a problem in github actions workflow for Win/Py3.11 at that time. So as an alternative if you want to use pip, you could instead use a Python 3.10 installation than installation with pip should also work without needing to compile.

Thank you dear magies for your replies.
Well, the installation using Anaconda distribution did work
But, to lunch my program “obspy”, I must → open Anaconda navigator → lunch the environment “obspy” → and lunch vs code from this navigator.
I tried to use the cmd " conda environment obspy " only using vs code but this didn’t work.