mwhoffman / pybo

Python package for modular Bayesian optimization
BSD 2-Clause "Simplified" License
134 stars 32 forks source link

[ImportError: cannot import name _args_from_interpreter_flags] [dynamic figure stucked] #28

Open teelada opened 8 years ago

teelada commented 8 years ago

1. When I execute animated.py on Pycharm or terminal: :~/PROJECT/BO/CODE/pybo-master/pybo/demos$ python -m animated :~/PROJECT/BO/CODE/pybo-master/pybo/demos$ python animated.py the following error always comes out:ImportError: cannot import name _args_from_interpreter_flags!!!

2. But when I execute python -m pybo.demos.animated, it can run. But I only get the dynamic figure for the first time when I installed it! Then every time when it runs, it get stucked and no figure displays!!!


/home/lidan/anaconda3/envs/py2/lib/python2.7/site-packages/matplotlib/init.py:878: UserWarning: axes.color_cycle is deprecated and replaced with axes.prop_cycle; please use the latter. warnings.warn(self.msg_depr % (key, alt_key)) Traceback (most recent call last): File "/home/lidan/anaconda3/envs/py2/lib/python2.7/runpy.py", line 174, in _run_module_as_main "main", fname, loader, pkg_name) File "/home/lidan/anaconda3/envs/py2/lib/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/home/lidan/PROJECT/BO/CODE/pybo-master/pybo/demos/animated.py", line 14, in from reggie import make_gp, MCMC File "/home/lidan/anaconda3/envs/py2/lib/python2.7/site-packages/reggie/init.py", line 7, in from .models import File "/home/lidan/anaconda3/envs/py2/lib/python2.7/site-packages/reggie/models/init.py", line 7, in from .gp import File "/home/lidan/anaconda3/envs/py2/lib/python2.7/site-packages/reggie/models/gp/init.py", line 7, in from .gp import File "/home/lidan/anaconda3/envs/py2/lib/python2.7/site-packages/reggie/models/gp/gp.py", line 20, in from ... import kernels File "/home/lidan/anaconda3/envs/py2/lib/python2.7/site-packages/reggie/kernels/init.py", line 7, in from .se import File "/home/lidan/anaconda3/envs/py2/lib/python2.7/site-packages/reggie/kernels/se.py", line 15, in from ._distances import rescale, dist, dist_foreach, diff File "/home/lidan/anaconda3/envs/py2/lib/python2.7/site-packages/reggie/kernels/_distances.py", line 9, in import scipy.spatial.distance as ssd File "/home/lidan/anaconda3/envs/py2/lib/python2.7/site-packages/scipy/spatial/init.py", line 93, in from .ckdtree import * File "scipy/spatial/ckdtree.pyx", line 20, in init scipy.spatial.ckdtree (scipy/spatial/ckdtree.cxx:17747) File "/home/lidan/anaconda3/envs/py2/lib/python2.7/multiprocessing/init.py", line 65, in from multiprocessing.util import SUBDEBUG, SUBWARNING File "/home/lidan/anaconda3/envs/py2/lib/python2.7/multiprocessing/util.py", line 41, in from subprocess import _args_from_interpreter_flags ImportError: cannot import name _args_from_interpreter_flags

python version: Python 2.7.12 |Anaconda custom (64-bit)| (default, Jul 2 2016, 17:42:40) [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2

aleva85 commented 7 years ago

Hi teelada, I am experiencing the same issue and was wandering if you found a way around it. I'd be grateful for any help you could provide. Best, Alessandro

EDIT: I believe the problem is related to the module subprocess.py (from the standard python libraries) and to the demo subprocess.py, which unfortunately shares the same name. Renaming this demo did the job for me. Now I'm stuck with the figure freezing...