Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6061417
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T08:56:08+00:00 2026-05-23T08:56:08+00:00

I have been trying PyMC these days, and I wrote a very simple mcmceasy.py.

  • 0

I have been trying PyMC these days, and I wrote a very simple mcmceasy.py. Interestingly, the script runs OK in IPython, however, when I use Python directly, it gives the following traceback:

Traceback (most recent call last):
  File "mcmceasy.py", line 2, in <module>
    from pymc import MvNormal, MCMC
  File "/usr/lib/python2.7/site-packages/pymc/__init__.py", line 55, in <module>
    import ScipyDistributions
  File "/usr/lib/python2.7/site-packages/pymc/ScipyDistributions.py", line 1, in <module>
    import scipy.stats.distributions as sc_dst
  File "/usr/lib/python2.7/site-packages/scipy/stats/__init__.py", line 12, in <module>
    import mstats
  File "/usr/lib/python2.7/site-packages/scipy/stats/mstats.py", line 3, in <module>
    from mstats_basic import *
  File "/usr/lib/python2.7/site-packages/scipy/stats/mstats_basic.py", line 52, in <module>
    import scipy.misc as misc
  File "/usr/lib/python2.7/site-packages/scipy/misc/__init__.py", line 20, in <module>
    __all__ += common.__all__
NameError: name 'common' is not defined

My question has 2 parts: 1. How to solve this problem with vanilla python shell? 2. What makes IPython free from this error?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T08:56:08+00:00Added an answer on May 23, 2026 at 8:56 am

    Of course I don’t have your script but I’ve successfully run the imports in question from Windows, Linux and OSX versions of 2.6 and 2.7 python in both IPython and python. No errors as you report.

    HOWEVER, looking at the “scipy/misc/init.py” the name common is not imported.

    from common import *
    #...more stuff
    __all__ += common.__all__
    

    The fact that the code works means that common is imported someplace else. Within scipy.__init__.py , PackageLoader is is imported from numpy and performs scary magic, checking paths of frame in the call stack etc.

    IPython has different imports from python, especially if you are using the pylab flag. That would make ipython and python different. I’d suggest trying the imports above separately. Calling an import before PyMC does it might be a work-around

    Otherwise, you should post your version of numpy which is where the PackageLoader is called from.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been trying to write my first user script for Google Chrome. It
I have been trying to figure out if there are any differences between these
I have been trying for what seems like two days now to get my
Have been trying on these codes and I want to send a email which
I have been trying to get a script to work on my site and
I have been trying for days to get this to work. I have the
Have been trying to write an awk script which processes a log file, but
Have been trying to fix this for the past hour. Here goes: <script type=text/javascript>
I have been trying for a few days now to get the composite key
Have been trying out Web2Py for a couple of days now and I decided

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.