PaulHancock / Aegean

The Aegean source finding program and associated tools
http://aegeantools.rtfd.io/
Other
47 stars 14 forks source link

Installing Aegean and Running BANE #199

Open ashy2212 opened 1 year ago

ashy2212 commented 1 year ago

Hi Paul,

I have followed the steps for the installation and successfully installed the latest version 2.3.0, however I cant seem to run BANE.

I am using a MacBook and this is the error I get:

(base) Aashini@Aashinis-Macbook-Pro AegeanTools-2.3.0 % BANE AGAL015.503-00.419.cont.image.tt0.fits 93714:INFO This is BANE v1.10.0-(2022-08-17) 93714:INFO using grid_size (19, 19), box_size (114, 114) 93714:INFO on data shape (100, 100) 93714:INFO using 8 cores 93714:INFO using 8 stripes Traceback (most recent call last): File "/Applications/anaconda3/bin/BANE", line 4, in import('pkg_resources').run_script('AegeanTools==2.3.0', 'BANE') File "/Applications/anaconda3/lib/python3.8/site-packages/pkg_resources/init.py", line 651, in run_script self.require(requires)[0].run_script(script_name, ns) File "/Applications/anaconda3/lib/python3.8/site-packages/pkg_resources/init.py", line 1448, in run_script exec(code, namespace, namespace) File "/Applications/anaconda3/lib/python3.8/site-packages/AegeanTools-2.3.0-py3.8.egg/EGG-INFO/scripts/BANE", line 9, in sys.exit(BANE.main(sys.argv[1:])) File "/Applications/anaconda3/lib/python3.8/site-packages/AegeanTools-2.3.0-py3.8.egg/AegeanTools/CLI/BANE.py", line 87, in main BANE.filter_image(im_name=options.image, out_base=options.out_base, File "/Applications/anaconda3/lib/python3.8/site-packages/AegeanTools-2.3.0-py3.8.egg/AegeanTools/BANE.py", line 487, in filter_image bkg, rms = filter_mc_sharemem(im_name, File "/Applications/anaconda3/lib/python3.8/site-packages/AegeanTools-2.3.0-py3.8.egg/AegeanTools/BANE.py", line 375, in filter_mc_sharemem pool = ctx.Pool(processes=cores, maxtasksperchild=1, File "/Applications/anaconda3/lib/python3.8/multiprocessing/context.py", line 119, in Pool return Pool(processes, initializer, initargs, maxtasksperchild, File "/Applications/anaconda3/lib/python3.8/multiprocessing/pool.py", line 212, in init self._repopulate_pool() File "/Applications/anaconda3/lib/python3.8/multiprocessing/pool.py", line 303, in _repopulate_pool return self._repopulate_pool_static(self._ctx, self.Process, File "/Applications/anaconda3/lib/python3.8/multiprocessing/pool.py", line 326, in _repopulate_pool_static w.start() File "/Applications/anaconda3/lib/python3.8/multiprocessing/process.py", line 121, in start self._popen = self._Popen(self) File "/Applications/anaconda3/lib/python3.8/multiprocessing/context.py", line 284, in _Popen return Popen(process_obj) File "/Applications/anaconda3/lib/python3.8/multiprocessing/popen_spawn_posix.py", line 32, in init super().init(process_obj) File "/Applications/anaconda3/lib/python3.8/multiprocessing/popen_fork.py", line 19, in init self._launch(process_obj) File "/Applications/anaconda3/lib/python3.8/multiprocessing/popen_spawn_posix.py", line 42, in _launch prep_data = spawn.get_preparation_data(process_obj._name) File "/Applications/anaconda3/lib/python3.8/multiprocessing/spawn.py", line 183, in get_preparation_data main_mod_name = getattr(main_module.spec, "name", None) AttributeError: module 'main' has no attribute 'spec'

Do you know how I can fix this issue?

Many thanks,

Ash

PaulHancock commented 1 year ago

Hi Ash,

I have not seen this issue before, but it appears to be related to multiprocessing on OSX. I have had issues with OSX compatibility before and thought that I had fixed the problem by using 'spawn' to create new processes.

In order to be able to debug this a little more, can you please let me know some more details of your operating system and the python environment you are using?

If you run aegean --versions, this will give me a snapshot of the modules you are using, but any extra information would be really helpful.