Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
STATA/Python Integration

I'm running Spyder Python 3.3.6 from Stata/IC 16.1 for Mac (64-bit Intel):

. python query ------------------------------------------------------------------------------------------------------ Python Settings set python_exec /users/jprenderg/opt/anaconda3/bin/python set python_userpath Python system information initialized yes version 3.7.4 architecture 64-bit library path /Users/jprenderg/opt/anaconda3/lib/libpython3.7m.dylib
I am able to import SCIPY ok. But can't import the "Stats" sub-package:

>>> from scipy import stats
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/users/jprenderg/opt/anaconda3/lib/python3.7/site-packages/scipy/stats/", line 379, in <module> from .stats import * File "/users/jprenderg/opt/anaconda3/lib/python3.7/site-packages/scipy/stats/", line 180, in <module> import scipy.special as special File "/users/jprenderg/opt/anaconda3/lib/python3.7/site-packages/scipy/special/", line 641, in <module> from ._ufuncs import * ImportError: dlopen(/users/jprenderg/opt/anaconda3/lib/python3.7/site-packages/scipy/special/, 2): Symbol not found: _main Referenced from: /users/jprenderg/opt/anaconda3/lib/python3.7/site-packages/scipy/special/ Expected in: flat namespace in /users/jprenderg/opt/anaconda3/lib/python3.7/site-packages/scipy/special/
Has anyone experienced this and solved the problem?

Note: "from scipy import stats" works fine from within Spyder. It seems to be a Stata issue.

Possibly Related Threads…
Thread Author Replies Views Last Post
Photo Integration of apache spark and Kafka on eclipse pyspark aupres 1 1,355 Feb-27-2021, 08:38 AM
Last Post: Serafim
  Tableau Time Series Prediction using Python Integration tobimarsh43 0 779 Jul-24-2020, 10:38 AM
Last Post: tobimarsh43
  R-PYTHON INTEGRATION RELATED PROBLEM arnab93 0 720 Jun-05-2020, 02:07 PM
Last Post: arnab93
  Integration of a complex function having singularities using quad amjad26 0 2,347 May-17-2019, 09:16 PM
Last Post: amjad26
  phython language java integration jammytcs123123 1 1,317 Jul-04-2018, 03:13 AM
Last Post: Skaperen
  SQLite DB integration duplicate columns rachitmishra25 1 3,758 Oct-27-2017, 11:20 AM
Last Post: buran
  Trapezoidal integration method in python. Getting wrong results auting82 5 3,975 Oct-14-2017, 07:38 PM
Last Post: buran
  Sympy Integration Flexico 5 5,100 Dec-07-2016, 07:24 AM
Last Post: micseydel

Forum Jump:

User Panel Messages

Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020