在cygwin/win11上安装scipy



我的python版本是3.9.10

我正在尝试安装python在cygwin通过

python3 -m pip install scipy 

我已经安装了,通过Cygwin安装程序:

  • gcc核心
  • gcc-g + +
  • libopenblas
  • liblapack
  • liblapack-devel
  • gcc-fortran
  • python39-devel
  • python39-wheel

我还使用了这个线程的解决方案来检查Python -dev安装是否成功:检查bash脚本

中是否存在Python开发文件任何建议都将不胜感激,

欢呼。

下面是冗长的错误报告的最后100行:

/tmp/pip-install-lggt3n7k/scipy_d9ae94430a22449eb2927159d9f7ad01/scipy/_lib/boost/boost/math/tools/promotion.hpp:148:37: error: static assertion failed: Sorry, but this platform does not have sufficient long double support for the special functions to be reliably implemented.
148 |          BOOST_STATIC_ASSERT_MSG((0 == ::boost::is_same<type, long double>::value), "Sorry, but this platform does not have sufficient long double support for the special functions to be reliably implemented.");
|                                  ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pip-install-lggt3n7k/scipy_d9ae94430a22449eb2927159d9f7ad01/scipy/_lib/boost/boost/static_assert.hpp:31:59: note: in definition of macro ‘BOOST_STATIC_ASSERT_MSG’
31 | #     define BOOST_STATIC_ASSERT_MSG( ... ) static_assert(__VA_ARGS__)
|                                                           ^~~~~~~~~~~
/tmp/pip-install-lggt3n7k/scipy_d9ae94430a22449eb2927159d9f7ad01/scipy/_lib/boost/boost/math/tools/promotion.hpp:148:37: note: ‘(0 == ((int)boost::integral_constant<bool, true>::value))’ evaluates to false
148 |          BOOST_STATIC_ASSERT_MSG((0 == ::boost::is_same<type, long double>::value), "Sorry, but this platform does not have sufficient long double support for the special functions to be reliably implemented.");
|                                  ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pip-install-lggt3n7k/scipy_d9ae94430a22449eb2927159d9f7ad01/scipy/_lib/boost/boost/static_assert.hpp:31:59: note: in definition of macro ‘BOOST_STATIC_ASSERT_MSG’
31 | #     define BOOST_STATIC_ASSERT_MSG( ... ) static_assert(__VA_ARGS__)
|                                                           ^~~~~~~~~~~
/tmp/pip-install-lggt3n7k/scipy_d9ae94430a22449eb2927159d9f7ad01/scipy/_lib/boost/boost/math/tools/promotion.hpp: In instantiation of ‘struct boost::math::tools::promote_args<long double, float, float, float, float, float>’:
/tmp/pip-install-lggt3n7k/scipy_d9ae94430a22449eb2927159d9f7ad01/scipy/_lib/boost/boost/math/special_functions/expm1.hpp:271:46:   required by substitution of ‘template<class T, class Policy> typename boost::math::tools::promote_args<T>::type boost::math::expm1(T, const Policy&) [with T = long double; Policy = boost::math::policies::policy<boost::math::policies::promote_float<false>, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy>]’
/tmp/pip-install-lggt3n7k/scipy_d9ae94430a22449eb2927159d9f7ad01/scipy/_lib/boost/boost/math/special_functions/detail/ibeta_inverse.hpp:541:36:   required from ‘T boost::math::detail::ibeta_inv_imp(T, T, T, T, const Policy&, T*) [with T = long double; Policy = boost::math::policies::policy<boost::math::policies::promote_float<false>, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy>]’
/tmp/pip-install-lggt3n7k/scipy_d9ae94430a22449eb2927159d9f7ad01/scipy/_lib/boost/boost/math/special_functions/detail/ibeta_inverse.hpp:979:30:   required from ‘typename boost::math::tools::promote_args<T1, T2, T3, T4>::type boost::math::ibetac_inv(T1, T2, T3, T4*, const Policy&) [with T1 = long double; T2 = long double; T3 = long double; T4 = long double; Policy = boost::math::policies::policy<boost::math::policies::discrete_quantile<boost::math::policies::integer_round_up> >; typename boost::math::tools::promote_args<T1, T2, T3, T4>::type = long double]’
/tmp/pip-install-lggt3n7k/scipy_d9ae94430a22449eb2927159d9f7ad01/scipy/_lib/boost/boost/math/distributions/beta.hpp:524:24:   required from ‘RealType boost::math::quantile(const boost::math::complemented2_type<boost::math::beta_distribution<RealType, Policy>, RealType>&) [with RealType = long double; Policy = boost::math::policies::policy<boost::math::policies::discrete_quantile<boost::math::policies::integer_round_up> >]’
/tmp/pip-install-lggt3n7k/scipy_d9ae94430a22449eb2927159d9f7ad01/scipy/stats/_boost/include/func_defs.hpp:110:33:   required from ‘RealType boost_isf(RealType, const Args ...) [with Dst = boost::math::beta_distribution; RealType = long double; Args = {long double, long double}]’
scipy/stats/_boost/src/beta_ufunc.cxx:3774:46:   required from here
/tmp/pip-install-lggt3n7k/scipy_d9ae94430a22449eb2927159d9f7ad01/scipy/_lib/boost/boost/math/tools/promotion.hpp:148:37: error: static assertion failed: Sorry, but this platform does not have sufficient long double support for the special functions to be reliably implemented.
148 |          BOOST_STATIC_ASSERT_MSG((0 == ::boost::is_same<type, long double>::value), "Sorry, but this platform does not have sufficient long double support for the special functions to be reliably implemented.");
|                                  ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pip-install-lggt3n7k/scipy_d9ae94430a22449eb2927159d9f7ad01/scipy/_lib/boost/boost/static_assert.hpp:31:59: note: in definition of macro ‘BOOST_STATIC_ASSERT_MSG’
31 | #     define BOOST_STATIC_ASSERT_MSG( ... ) static_assert(__VA_ARGS__)
|                                                           ^~~~~~~~~~~
/tmp/pip-install-lggt3n7k/scipy_d9ae94430a22449eb2927159d9f7ad01/scipy/_lib/boost/boost/math/tools/promotion.hpp:148:37: note: ‘(0 == ((int)boost::integral_constant<bool, true>::value))’ evaluates to false
148 |          BOOST_STATIC_ASSERT_MSG((0 == ::boost::is_same<type, long double>::value), "Sorry, but this platform does not have sufficient long double support for the special functions to be reliably implemented.");
|                                  ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pip-install-lggt3n7k/scipy_d9ae94430a22449eb2927159d9f7ad01/scipy/_lib/boost/boost/static_assert.hpp:31:59: note: in definition of macro ‘BOOST_STATIC_ASSERT_MSG’
31 | #     define BOOST_STATIC_ASSERT_MSG( ... ) static_assert(__VA_ARGS__)
|                                                           ^~~~~~~~~~~
/tmp/pip-install-lggt3n7k/scipy_d9ae94430a22449eb2927159d9f7ad01/scipy/_lib/boost/boost/math/tools/promotion.hpp: In instantiation of ‘struct boost::math::tools::promote_args<long double, long double, boost::math::policies::policy<boost::math::policies::promote_float<false>, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy>, float, float, float>’:
/tmp/pip-install-lggt3n7k/scipy_d9ae94430a22449eb2927159d9f7ad01/scipy/_lib/boost/boost/math/special_functions/beta.hpp:1467:4:   required by substitution of ‘template<class RT1, class RT2, class A> typename boost::math::tools::promote_args<RT1, RT2, A>::type boost::math::beta(RT1, RT2, A) [with RT1 = long double; RT2 = long double; A = boost::math::policies::policy<boost::math::policies::promote_float<false>, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy>]’
/tmp/pip-install-lggt3n7k/scipy_d9ae94430a22449eb2927159d9f7ad01/scipy/_lib/boost/boost/math/special_functions/detail/ibeta_inverse.hpp:607:51:   required from ‘T boost::math::detail::ibeta_inv_imp(T, T, T, T, const Policy&, T*) [with T = long double; Policy = boost::math::policies::policy<boost::math::policies::promote_float<false>, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy>]’
/tmp/pip-install-lggt3n7k/scipy_d9ae94430a22449eb2927159d9f7ad01/scipy/_lib/boost/boost/math/special_functions/detail/ibeta_inverse.hpp:979:30:   required from ‘typename boost::math::tools::promote_args<T1, T2, T3, T4>::type boost::math::ibetac_inv(T1, T2, T3, T4*, const Policy&) [with T1 = long double; T2 = long double; T3 = long double; T4 = long double; Policy = boost::math::policies::policy<boost::math::policies::discrete_quantile<boost::math::policies::integer_round_up> >; typename boost::math::tools::promote_args<T1, T2, T3, T4>::type = long double]’
/tmp/pip-install-lggt3n7k/scipy_d9ae94430a22449eb2927159d9f7ad01/scipy/_lib/boost/boost/math/distributions/beta.hpp:524:24:   required from ‘RealType boost::math::quantile(const boost::math::complemented2_type<boost::math::beta_distribution<RealType, Policy>, RealType>&) [with RealType = long double; Policy = boost::math::policies::policy<boost::math::policies::discrete_quantile<boost::math::policies::integer_round_up> >]’
/tmp/pip-install-lggt3n7k/scipy_d9ae94430a22449eb2927159d9f7ad01/scipy/stats/_boost/include/func_defs.hpp:110:33:   required from ‘RealType boost_isf(RealType, const Args ...) [with Dst = boost::math::beta_distribution; RealType = long double; Args = {long double, long double}]’
scipy/stats/_boost/src/beta_ufunc.cxx:3774:46:   required from here
/tmp/pip-install-lggt3n7k/scipy_d9ae94430a22449eb2927159d9f7ad01/scipy/_lib/boost/boost/math/tools/promotion.hpp:148:37: error: static assertion failed: Sorry, but this platform does not have sufficient long double support for the special functions to be reliably implemented.
148 |          BOOST_STATIC_ASSERT_MSG((0 == ::boost::is_same<type, long double>::value), "Sorry, but this platform does not have sufficient long double support for the special functions to be reliably implemented.");
|                                  ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pip-install-lggt3n7k/scipy_d9ae94430a22449eb2927159d9f7ad01/scipy/_lib/boost/boost/static_assert.hpp:31:59: note: in definition of macro ‘BOOST_STATIC_ASSERT_MSG’
31 | #     define BOOST_STATIC_ASSERT_MSG( ... ) static_assert(__VA_ARGS__)
|                                                           ^~~~~~~~~~~
/tmp/pip-install-lggt3n7k/scipy_d9ae94430a22449eb2927159d9f7ad01/scipy/_lib/boost/boost/math/tools/promotion.hpp:148:37: note: ‘(0 == ((int)boost::integral_constant<bool, true>::value))’ evaluates to false
148 |          BOOST_STATIC_ASSERT_MSG((0 == ::boost::is_same<type, long double>::value), "Sorry, but this platform does not have sufficient long double support for the special functions to be reliably implemented.");
|                                  ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pip-install-lggt3n7k/scipy_d9ae94430a22449eb2927159d9f7ad01/scipy/_lib/boost/boost/static_assert.hpp:31:59: note: in definition of macro ‘BOOST_STATIC_ASSERT_MSG’
31 | #     define BOOST_STATIC_ASSERT_MSG( ... ) static_assert(__VA_ARGS__)
|                                                           ^~~~~~~~~~~
/tmp/pip-install-lggt3n7k/scipy_d9ae94430a22449eb2927159d9f7ad01/scipy/_lib/boost/boost/math/tools/promotion.hpp: In instantiation of ‘struct boost::math::tools::promote_args<long double, long double, float, float, float, float>’:
/tmp/pip-install-lggt3n7k/scipy_d9ae94430a22449eb2927159d9f7ad01/scipy/_lib/boost/boost/math/special_functions/powm1.hpp:66:4:   required by substitution of ‘template<class T1, class T2, class Policy> typename boost::math::tools::promote_args<RT1, RT2>::type boost::math::powm1(T1, T2, const Policy&) [with T1 = long double; T2 = long double; Policy = boost::math::policies::policy<boost::math::policies::promote_float<false>, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy>]’
/tmp/pip-install-lggt3n7k/scipy_d9ae94430a22449eb2927159d9f7ad01/scipy/_lib/boost/boost/math/special_functions/beta.hpp:1099:44:   required from ‘T boost::math::detail::ibeta_imp(T, T, T, const Policy&, bool, bool, T*) [with T = long double; Policy = boost::math::policies::policy<boost::math::policies::promote_float<false>, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy>]’
/tmp/pip-install-lggt3n7k/scipy_d9ae94430a22449eb2927159d9f7ad01/scipy/_lib/boost/boost/math/special_functions/beta.hpp:1395:20:   required from ‘T boost::math::detail::ibeta_imp(T, T, T, const Policy&, bool, bool) [with T = long double; Policy = boost::math::policies::policy<boost::math::policies::promote_float<false>, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy>]’
/tmp/pip-install-lggt3n7k/scipy_d9ae94430a22449eb2927159d9f7ad01/scipy/_lib/boost/boost/math/special_functions/beta.hpp:1534:93:   required from ‘typename boost::math::tools::promote_args<RT1, RT2, A>::type boost::math::ibeta(RT1, RT2, RT3, const Policy&) [with RT1 = long double; RT2 = long double; RT3 = long double; Policy = boost::math::policies::policy<boost::math::policies::discrete_quantile<boost::math::policies::integer_round_up> >; typename boost::math::tools::promote_args<RT1, RT2, A>::type = long double]’
/tmp/pip-install-lggt3n7k/scipy_d9ae94430a22449eb2927159d9f7ad01/scipy/_lib/boost/boost/math/distributions/beta.hpp:416:19:   required from ‘RealType boost::math::cdf(const boost::math::beta_distribution<RealType, Policy>&, const RealType&) [with RealType = long double; Policy = boost::math::policies::policy<boost::math::policies::discrete_quantile<boost::math::policies::integer_round_up> >]’
/tmp/pip-install-lggt3n7k/scipy_d9ae94430a22449eb2927159d9f7ad01/scipy/stats/_boost/include/func_defs.hpp:85:32:   required from ‘RealType boost_cdf(RealType, const Args ...) [with Dst = boost::math::beta_distribution; RealType = long double; Args = {long double, long double}]’
scipy/stats/_boost/src/beta_ufunc.cxx:3252:46:   required from here
/tmp/pip-install-lggt3n7k/scipy_d9ae94430a22449eb2927159d9f7ad01/scipy/_lib/boost/boost/math/tools/promotion.hpp:148:37: error: static assertion failed: Sorry, but this platform does not have sufficient long double support for the special functions to be reliably implemented.
148 |          BOOST_STATIC_ASSERT_MSG((0 == ::boost::is_same<type, long double>::value), "Sorry, but this platform does not have sufficient long double support for the special functions to be reliably implemented.");
|                                  ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pip-install-lggt3n7k/scipy_d9ae94430a22449eb2927159d9f7ad01/scipy/_lib/boost/boost/static_assert.hpp:31:59: note: in definition of macro ‘BOOST_STATIC_ASSERT_MSG’
31 | #     define BOOST_STATIC_ASSERT_MSG( ... ) static_assert(__VA_ARGS__)
|                                                           ^~~~~~~~~~~
/tmp/pip-install-lggt3n7k/scipy_d9ae94430a22449eb2927159d9f7ad01/scipy/_lib/boost/boost/math/tools/promotion.hpp:148:37: note: ‘(0 == ((int)boost::integral_constant<bool, true>::value))’ evaluates to false
148 |          BOOST_STATIC_ASSERT_MSG((0 == ::boost::is_same<type, long double>::value), "Sorry, but this platform does not have sufficient long double support for the special functions to be reliably implemented.");
|                                  ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pip-install-lggt3n7k/scipy_d9ae94430a22449eb2927159d9f7ad01/scipy/_lib/boost/boost/static_assert.hpp:31:59: note: in definition of macro ‘BOOST_STATIC_ASSERT_MSG’
31 | #     define BOOST_STATIC_ASSERT_MSG( ... ) static_assert(__VA_ARGS__)
|                                                           ^~~~~~~~~~~
/tmp/pip-install-lggt3n7k/scipy_d9ae94430a22449eb2927159d9f7ad01/scipy/_lib/boost/boost/math/tools/promotion.hpp: In instantiation of ‘struct boost::math::tools::promote_args<long double, boost::math::policies::policy<boost::math::policies::promote_float<false>, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy>, float, float, float, float>’:
/tmp/pip-install-lggt3n7k/scipy_d9ae94430a22449eb2927159d9f7ad01/scipy/_lib/boost/boost/math/special_functions/gamma.hpp:2002:4:   required by substitution of ‘template<class RT1, class RT2> typename boost::math::tools::promote_args<RT1, RT2>::type boost::math::tgamma(RT1, RT2) [with RT1 = long double; RT2 = boost::math::policies::policy<boost::math::policies::promote_float<false>, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy>]’
/tmp/pip-install-lggt3n7k/scipy_d9ae94430a22449eb2927159d9f7ad01/scipy/_lib/boost/boost/math/special_functions/gamma.hpp:1627:33:   required from ‘T boost::math::detail::tgamma_delta_ratio_imp(T, T, const Policy&) [with T = long double; Policy = boost::math::policies::policy<boost::math::policies::promote_float<false>, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy>]’
/tmp/pip-install-lggt3n7k/scipy_d9ae94430a22449eb2927159d9f7ad01/scipy/_lib/boost/boost/math/special_functions/gamma.hpp:2126:106:   required from ‘typename boost::math::tools::promote_args<RT1, RT2>::type boost::math::tgamma_delta_ratio(T1, T2, const Policy&) [with T1 = long double; T2 = long double; Policy = boost::math::policies::policy<boost::math::policies::promote_float<false>, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy>; typename boost::math::tools::promote_args<RT1, RT2>::type = long double]’
/tmp/pip-install-lggt3n7k/scipy_d9ae94430a22449eb2927159d9f7ad01/scipy/_lib/boost/boost/math/special_functions/detail/t_distribution_inv.hpp:136:41:   required from ‘T boost::math::detail::inverse_students_t_body_series(T, T, const Policy&) [with T = long double; Policy = boost::math::policies::policy<boost::math::policies::promote_float<false>, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy>]’
/tmp/pip-install-lggt3n7k/scipy_d9ae94430a22449eb2927159d9f7ad01/scipy/_lib/boost/boost/math/special_functions/detail/t_distribution_inv.hpp:390:73:   required from ‘T boost::math::detail::inverse_students_t(T, T, T, const Policy&, bool*) [with T = long double; Policy = boost::math::policies::policy<boost::math::policies::promote_float<false>, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy>]’
/tmp/pip-install-lggt3n7k/scipy_d9ae94430a22449eb2927159d9f7ad01/scipy/_lib/boost/boost/math/special_functions/detail/t_distribution_inv.hpp:424:49:   required from ‘T boost::math::detail::find_ibeta_inv_from_t_dist(T, T, T, T*, const Policy&) [with T = long double; Policy = boost::math::policies::policy<boost::math::policies::promote_float<false>, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy>]’
/tmp/pip-install-lggt3n7k/scipy_d9ae94430a22449eb2927159d9f7ad01/scipy/_lib/boost/boost/math/special_functions/detail/ibeta_inverse.hpp:532:37:   required from ‘T boost::math::detail::ibeta_inv_imp(T, T, T, T, const Policy&, T*) [with T = long double; Policy = boost::math::policies::policy<boost::math::policies::promote_float<false>, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy, boost::math::policies::default_policy>]’
/tmp/pip-install-lggt3n7k/scipy_d9ae94430a22449eb2927159d9f7ad01/scipy/_lib/boost/boost/math/special_functions/detail/ibeta_inverse.hpp:979:30:   required from ‘typename boost::math::tools::promote_args<T1, T2, T3, T4>::type boost::math::ibetac_inv(T1, T2, T3, T4*, const Policy&) [with T1 = long double; T2 = long double; T3 = long double; T4 = long double; Policy = boost::math::policies::policy<boost::math::policies::discrete_quantile<boost::math::policies::integer_round_up> >; typename boost::math::tools::promote_args<T1, T2, T3, T4>::type = long double]’
/tmp/pip-install-lggt3n7k/scipy_d9ae94430a22449eb2927159d9f7ad01/scipy/_lib/boost/boost/math/distributions/beta.hpp:524:24:   required from ‘RealType boost::math::quantile(const boost::math::complemented2_type<boost::math::beta_distribution<RealType, Policy>, RealType>&) [with RealType = long double; Policy = boost::math::policies::policy<boost::math::policies::discrete_quantile<boost::math::policies::integer_round_up> >]’
/tmp/pip-install-lggt3n7k/scipy_d9ae94430a22449eb2927159d9f7ad01/scipy/stats/_boost/include/func_defs.hpp:110:33:   required from ‘RealType boost_isf(RealType, const Args ...) [with Dst = boost::math::beta_distribution; RealType = long double; Args = {long double, long double}]’
scipy/stats/_boost/src/beta_ufunc.cxx:3774:46:   required from here
/tmp/pip-install-lggt3n7k/scipy_d9ae94430a22449eb2927159d9f7ad01/scipy/_lib/boost/boost/math/tools/promotion.hpp:148:37: error: static assertion failed: Sorry, but this platform does not have sufficient long double support for the special functions to be reliably implemented.
148 |          BOOST_STATIC_ASSERT_MSG((0 == ::boost::is_same<type, long double>::value), "Sorry, but this platform does not have sufficient long double support for the special functions to be reliably implemented.");
|                                  ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pip-install-lggt3n7k/scipy_d9ae94430a22449eb2927159d9f7ad01/scipy/_lib/boost/boost/static_assert.hpp:31:59: note: in definition of macro ‘BOOST_STATIC_ASSERT_MSG’
31 | #     define BOOST_STATIC_ASSERT_MSG( ... ) static_assert(__VA_ARGS__)
|                                                           ^~~~~~~~~~~
/tmp/pip-install-lggt3n7k/scipy_d9ae94430a22449eb2927159d9f7ad01/scipy/_lib/boost/boost/math/tools/promotion.hpp:148:37: note: ‘(0 == ((int)boost::integral_constant<bool, true>::value))’ evaluates to false
148 |          BOOST_STATIC_ASSERT_MSG((0 == ::boost::is_same<type, long double>::value), "Sorry, but this platform does not have sufficient long double support for the special functions to be reliably implemented.");
|                                  ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/pip-install-lggt3n7k/scipy_d9ae94430a22449eb2927159d9f7ad01/scipy/_lib/boost/boost/static_assert.hpp:31:59: note: in definition of macro ‘BOOST_STATIC_ASSERT_MSG’
31 | #     define BOOST_STATIC_ASSERT_MSG( ... ) static_assert(__VA_ARGS__)
|                                                           ^~~~~~~~~~~
error: Command "g++ -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DBOOST_MATH_DOMAIN_ERROR_POLICY=ignore_error -DBOOST_MATH_EVALUATION_ERROR_POLICY=user_error -DBOOST_MATH_OVERFLOW_ERROR_POLICY=user_error -DBOOST_MATH_PROMOTE_DOUBLE_POLICY=false -Iscipy/stats/_boost/include/ -Iscipy/stats/_boost/src/ -I/tmp/pip-build-env-ms79kstb/overlay/lib/python3.9/site-packages/numpy/core/include -I/tmp/pip-install-lggt3n7k/scipy_d9ae94430a22449eb2927159d9f7ad01/scipy/_lib/boost -I/tmp/pip-build-env-ms79kstb/overlay/lib/python3.9/site-packages/numpy/core/include -I/usr/include/python3.9 -c scipy/stats/_boost/src/beta_ufunc.cxx -o build/temp.cygwin-3.3.5-x86_64-3.9/scipy/stats/_boost/src/beta_ufunc.o -MMD -MF build/temp.cygwin-3.3.5-x86_64-3.9/scipy/stats/_boost/src/beta_ufunc.o.d -std=c++14" failed with exit status 1
[end of output]

注意:此错误源自子进程,可能不是pip的问题。错误:为scipy构建轮子失败错误:无法为scipy构建轮子,这需要安装pyproject。toml-based项目

我在Cygwin中使用pip3 install Scipy也遇到了同样的问题。

然而,我用我的Windows python解决了这个问题。最初,我使用的Cygwin的Python版本是3.9,它带有安装问题。我试着把Python切换到我的Windows版本,也就是Python 3.11,这个版本可以导入Scipy。

转到根目录

cd ~ 
ls -a

输入图片描述

nano .bashrc
# add this command at the bottom of the file
export PATH= *Your_Windows'_Python_Address* :$PATH

输入图片描述

退出并保存更改。现在,您只需将Cygwin默认python切换为Windows python。

# Reload the file
source .bashrc

which python
python --version

我认为你现在可以导入scipy。