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

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

Output:
. 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
Error:
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/users/jprenderg/opt/anaconda3/lib/python3.7/site-packages/scipy/stats/__init__.py", line 379, in <module> from .stats import * File "/users/jprenderg/opt/anaconda3/lib/python3.7/site-packages/scipy/stats/stats.py", line 180, in <module> import scipy.special as special File "/users/jprenderg/opt/anaconda3/lib/python3.7/site-packages/scipy/special/__init__.py", line 641, in <module> from ._ufuncs import * ImportError: dlopen(/users/jprenderg/opt/anaconda3/lib/python3.7/site-packages/scipy/special/_ufuncs.cpython-37m-darwin.so, 2): Symbol not found: _main Referenced from: /users/jprenderg/opt/anaconda3/lib/python3.7/site-packages/scipy/special/_ufuncs.cpython-37m-darwin.so Expected in: flat namespace in /users/jprenderg/opt/anaconda3/lib/python3.7/site-packages/scipy/special/_ufuncs.cpython-37m-darwin.so
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.
Reply


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

Forum Jump:

User Panel Messages

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