-
Notifications
You must be signed in to change notification settings - Fork 284
Description
Hi!
I'm trying to use the tomopy package on windows 10, installed via conda as recommended. At the moment I'm just trying to get one of the example scripts in the documentation to work (p.30 in the documentation):
import tomopy
obj = tomopy.shepp3d()
ang = tomopy.angles(180)
sim = tomopy.project(obj, ang)
rec = tomopy.recon(sim, ang, algorithm='art')
import pylab
pylab.imshow(rec[64], cmap='gray')
pylab.show()I get the following error:
(base) C:\Users\Hanna>python .\Documents\PythonScripts\main_test_tomopy.py
RuntimeError:
An attempt has been made to start a new process before the
current process has finished its bootstrapping phase.
This probably means that you are not using fork to start your
child processes and you have forgotten to use the proper idiom
in the main module:
if __name__ == '__main__':
freeze_support()
...
The "freeze_support()" line can be omitted if the program
is not going to be frozen to produce an executable.It doesn't give me my prompt back neither. I think it is caused by the call of tomopy.project() (just testing using print() after each line of code).
I've first tried running it via spyder (didn't work in the ipython kernel but also didn't raise an error), via spyder using an external kernel (didn't work, same multiprocessing RuntimeError), via the windows prompt (after manually adding the path to my python.exe, which killed spyder so it would not launch anymore, which I somehow could not fix, so I de-installed Anaconda and installed it again) and running it via the Anaconda prompt (see RuntimeError above). By now I've installed and de-installed Anaconda a couple of times, trying to wipe the PC clean with anaconda-clean, using the Anaconda Deinstaller and manually deleting the leftovers in the regedit.
My latest try was only using Miniconda and manually installing the packages I need, because I've read that Spyder+Windows+Multiprocessing doesn't like each other.
I'm still running into the same error.
I have a Intel GPU, could that cause issues? (the astra toolbox doesn't work, but I thought maybe something basic in tomopy without astra should work nevertheless?)
Any ideas?
Shall I try to install tomopy from source instead?
I'm so close to installing Linux and trying there...