Issue 1:
Describe your issue.

installed with python3.10 -m pip install scipy and after a long time it returend without any error.

However python3.10 -c 'import scipy.spatial' fails with:

Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/dave/.local/lib/python3.10/site-packages/scipy/spatial/__init__.py", line 107, in <module>
from . import distance, transform
File "/home/dave/.local/lib/python3.10/site-packages/scipy/spatial/transform/__init__.py", line 19, in <module>
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

Note: _PyGen_Send is defined in /usr/lib64/libpython3.9.so but not in /usr/lib64/libpython3.10.so.

Reproducing Code Example

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'

Error message

Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/dave/.local/lib/python3.10/site-packages/scipy/spatial/__init__.py", line 107, in <module>
from . import distance, transform
File "/home/dave/.local/lib/python3.10/site-packages/scipy/spatial/transform/__init__.py", line 19, in <module>
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

SciPy/NumPy/Python version information

1.6.1 1.21.3 sys.version_info(major=3, minor=10, micro=0, releaselevel='final', serial=0)

Issue 2:
Describe your issue.

Importing scipy.signal under Py3.10 (in a venv) fails with this message (on Py3.9.4 and older it works):

$ 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.
>>> import scipy.signal
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "~/vgl310/lib/python3.10/site-packages/scipy/signal/__init__.py", line 302, in <module>
from .filter_design import *
File "~/vgl310/lib/python3.10/site-packages/scipy/signal/filter_design.py", line 16, in <module>
from scipy import special, optimize, fft as sp_fft
File "~/vgl310/lib/python3.10/site-packages/scipy/optimize/__init__.py", line 421, in <module>
from ._shgo import shgo
File "~/vgl310/lib/python3.10/site-packages/scipy/optimize/_shgo.py", line 9, in <module>
from scipy import spatial
File "~/vgl310/lib/python3.10/site-packages/scipy/spatial/__init__.py", line 107, in <module>
from . import distance, transform
File "/home/ullix/geigerlog/vgl310/lib/python3.10/site-packages/scipy/spatial/transform/__init__.py", line 19, in <module>
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

The latest version of scipy is installed:

$ python3 -m pip install -U scipy
Requirement already satisfied: scipy in ~/vgl310/lib/python3.10/site-packages (1.6.1)
Requirement already satisfied: numpy>=1.16.5 in ~/vgl310/lib/python3.10/site-packages (from scipy) (1.21.2)

Reproducing Code Example

-

Error message

-

SciPy/NumPy/Python version information

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)