<h3 dir="auto">Describe your issue.</h3>
<p dir="auto">installed with <code class="notranslate">python3.10 -m pip install scipy</code> and after a long time it returend without any error.</p>
<p dir="auto">However <code class="notranslate">python3.10 -c 'import scipy.spatial'</code> fails with:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Traceback (most recent call last):
  File &quot;&lt;string&gt;&quot;, line 1, in &lt;module&gt;
  File &quot;/home/dave/.local/lib/python3.10/site-packages/scipy/spatial/__init__.py&quot;, line 107, in &lt;module&gt;
    from . import distance, transform
  File &quot;/home/dave/.local/lib/python3.10/site-packages/scipy/spatial/transform/__init__.py&quot;, line 19, in &lt;module&gt;
    from .rotation import Rotation, Slerp
ImportError: /home/dave/.local/lib/python3.10/site-packages/scipy/spatial/transform/rotation.cpython-310-x86_64-linux-gnu.so: undefined symbol: _PyGen_Send"><pre class="notranslate"><code class="notranslate">Traceback (most recent call last):
  File "&lt;string&gt;", line 1, in &lt;module&gt;
  File "/home/dave/.local/lib/python3.10/site-packages/scipy/spatial/__init__.py", line 107, in &lt;module&gt;
    from . import distance, transform
  File "/home/dave/.local/lib/python3.10/site-packages/scipy/spatial/transform/__init__.py", line 19, in &lt;module&gt;
    from .rotation import Rotation, Slerp
ImportError: /home/dave/.local/lib/python3.10/site-packages/scipy/spatial/transform/rotation.cpython-310-x86_64-linux-gnu.so: undefined symbol: _PyGen_Send
</code></pre></div>
<p dir="auto">Note: <code class="notranslate">_PyGen_Send</code> is defined in /usr/lib64/libpython3.9.so but not in /usr/lib64/libpython3.10.so.</p>
<h3 dir="auto">Reproducing Code Example</h3>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Start from fedora 34

install python3.9 (default) and python3.10

sudo dnf install python3.9-devel python3.10
python3.10 -m ensurepip
python3.10 -m pip install scipy
python3.10 -c 'import scipy.spatial'"><pre class="notranslate"><span class="pl-v">Start</span> <span class="pl-k">from</span> <span class="pl-s1">fedora</span> <span class="pl-c1">34</span>

<span class="pl-en">install</span> <span class="pl-s1">python3</span><span class="pl-c1">.9</span> (<span class="pl-s1">default</span>) <span class="pl-c1">and</span> <span class="pl-s1">python3</span>.<span class="pl-c1">10</span>

<span class="pl-s1">sudo</span> <span class="pl-s1">dnf</span> <span class="pl-s1">install</span> <span class="pl-s1">python3</span><span class="pl-c1">.9</span><span class="pl-c1">-</span><span class="pl-s1">devel</span> <span class="pl-s1">python3</span><span class="pl-c1">.10</span>
<span class="pl-s1">python3</span>.<span class="pl-c1">10</span> <span class="pl-c1">-</span><span class="pl-s1">m</span> <span class="pl-s1">ensurepip</span>
<span class="pl-s1">python3</span>.<span class="pl-c1">10</span> <span class="pl-c1">-</span><span class="pl-s1">m</span> <span class="pl-s1">pip</span> <span class="pl-s1">install</span> <span class="pl-s1">scipy</span>
<span class="pl-s1">python3</span>.<span class="pl-c1">10</span> <span class="pl-c1">-</span><span class="pl-s1">c</span> <span class="pl-s">'import scipy.spatial'</span></pre></div>
<h3 dir="auto">Error message</h3>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Traceback (most recent call last):
  File &quot;&lt;string&gt;&quot;, line 1, in &lt;module&gt;
  File &quot;/home/dave/.local/lib/python3.10/site-packages/scipy/spatial/__init__.py&quot;, line 107, in &lt;module&gt;
    from . import distance, transform
  File &quot;/home/dave/.local/lib/python3.10/site-packages/scipy/spatial/transform/__init__.py&quot;, line 19, in &lt;module&gt;
    from .rotation import Rotation, Slerp
ImportError: /home/dave/.local/lib/python3.10/site-packages/scipy/spatial/transform/rotation.cpython-310-x86_64-linux-gnu.so: undefined symbol: _PyGen_Send"><pre class="notranslate">Traceback (most recent call last):
  File <span class="pl-s"><span class="pl-pds">"</span>&lt;string&gt;<span class="pl-pds">"</span></span>, line 1, <span class="pl-k">in</span> <span class="pl-k">&lt;</span>module<span class="pl-k">&gt;</span>
  File <span class="pl-s"><span class="pl-pds">"</span>/home/dave/.local/lib/python3.10/site-packages/scipy/spatial/__init__.py<span class="pl-pds">"</span></span>, line 107, <span class="pl-k">in</span> <span class="pl-k">&lt;</span>module<span class="pl-k">&gt;</span>
    from <span class="pl-c1">.</span> import distance, transform
  File <span class="pl-s"><span class="pl-pds">"</span>/home/dave/.local/lib/python3.10/site-packages/scipy/spatial/transform/__init__.py<span class="pl-pds">"</span></span>, line 19, <span class="pl-k">in</span> <span class="pl-k">&lt;</span>module<span class="pl-k">&gt;</span>
    from .rotation import Rotation, Slerp
ImportError: /home/dave/.local/lib/python3.10/site-packages/scipy/spatial/transform/rotation.cpython-310-x86_64-linux-gnu.so: undefined symbol: _PyGen_Send</pre></div>
<h3 dir="auto">SciPy/NumPy/Python version information</h3>
<p dir="auto">1.6.1 1.21.3 sys.version_info(major=3, minor=10, micro=0, releaselevel='final', serial=0)</p>
<h3 dir="auto">Describe your issue.</h3>
<p dir="auto">Importing <code class="notranslate">scipy.signal</code> under Py3.10 (in a venv) fails with this message (on Py3.9.4 and older it works):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ python3
Python 3.10.0a6 (default, Mar  2 2021, 02:01:08) [GCC 5.4.0 20160609] on linux
Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.
&gt;&gt;&gt; import scipy.signal
Traceback (most recent call last):
  File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;
  File &quot;~/vgl310/lib/python3.10/site-packages/scipy/signal/__init__.py&quot;, line 302, in &lt;module&gt;
    from .filter_design import *
  File &quot;~/vgl310/lib/python3.10/site-packages/scipy/signal/filter_design.py&quot;, line 16, in &lt;module&gt;
    from scipy import special, optimize, fft as sp_fft
  File &quot;~/vgl310/lib/python3.10/site-packages/scipy/optimize/__init__.py&quot;, line 421, in &lt;module&gt;
    from ._shgo import shgo
  File &quot;~/vgl310/lib/python3.10/site-packages/scipy/optimize/_shgo.py&quot;, line 9, in &lt;module&gt;
    from scipy import spatial
  File &quot;~/vgl310/lib/python3.10/site-packages/scipy/spatial/__init__.py&quot;, line 107, in &lt;module&gt;
    from . import distance, transform
  File &quot;/home/ullix/geigerlog/vgl310/lib/python3.10/site-packages/scipy/spatial/transform/__init__.py&quot;, line 19, in &lt;module&gt;
    from .rotation import Rotation, Slerp
ImportError: /home/ullix/geigerlog/vgl310/lib/python3.10/site-packages/scipy/spatial/transform/rotation.cpython-310-x86_64-linux-gnu.so: undefined symbol: _PyGen_Send"><pre class="notranslate"><code class="notranslate">$ python3
Python 3.10.0a6 (default, Mar  2 2021, 02:01:08) [GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
&gt;&gt;&gt; import scipy.signal
Traceback (most recent call last):
  File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  File "~/vgl310/lib/python3.10/site-packages/scipy/signal/__init__.py", line 302, in &lt;module&gt;
    from .filter_design import *
  File "~/vgl310/lib/python3.10/site-packages/scipy/signal/filter_design.py", line 16, in &lt;module&gt;
    from scipy import special, optimize, fft as sp_fft
  File "~/vgl310/lib/python3.10/site-packages/scipy/optimize/__init__.py", line 421, in &lt;module&gt;
    from ._shgo import shgo
  File "~/vgl310/lib/python3.10/site-packages/scipy/optimize/_shgo.py", line 9, in &lt;module&gt;
    from scipy import spatial
  File "~/vgl310/lib/python3.10/site-packages/scipy/spatial/__init__.py", line 107, in &lt;module&gt;
    from . import distance, transform
  File "/home/ullix/geigerlog/vgl310/lib/python3.10/site-packages/scipy/spatial/transform/__init__.py", line 19, in &lt;module&gt;
    from .rotation import Rotation, Slerp
ImportError: /home/ullix/geigerlog/vgl310/lib/python3.10/site-packages/scipy/spatial/transform/rotation.cpython-310-x86_64-linux-gnu.so: undefined symbol: _PyGen_Send
</code></pre></div>
<p dir="auto">The latest version of scipy is installed:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ python3 -m pip install -U scipy
Requirement already satisfied: scipy in ~/vgl310/lib/python3.10/site-packages (1.6.1)
Requirement already satisfied: numpy&gt;=1.16.5 in ~/vgl310/lib/python3.10/site-packages (from scipy) (1.21.2)"><pre class="notranslate"><code class="notranslate">$ python3 -m pip install -U scipy
Requirement already satisfied: scipy in ~/vgl310/lib/python3.10/site-packages (1.6.1)
Requirement already satisfied: numpy&gt;=1.16.5 in ~/vgl310/lib/python3.10/site-packages (from scipy) (1.21.2)
</code></pre></div>
<h3 dir="auto">Reproducing Code Example</h3>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="-"><pre class="notranslate"><span class="pl-c1">-</span></pre></div>
<h3 dir="auto">Error message</h3>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="-"><pre class="notranslate">-</pre></div>
<h3 dir="auto">SciPy/NumPy/Python version information</h3>
<p dir="auto"><code class="notranslate">import sys, scipy, numpy; print(scipy.__version__, numpy.__version__, sys.version_info) 1.6.1 1.21.2 sys.version_info(major=3, minor=10, micro=0, releaselevel='alpha', serial=6)</code></p>