Closed mit10000 closed 5 years ago
What version of Ubuntu? You are using the Python from the system? It installed all the packages correctly? What is the output which python
?
Thanks for replying!
Ubuntu 16.04 Used both system Python and in virtual environment Did not notice errors, but had some warnings in VM: which python get /home/mit10000/anaconda3/envs/pytorch_try/bin/python
outsied VM: which python get /home/mit10000/anaconda3/bin/python
It's using the anaconda python. What you can do is call python using the full path, this way:
/usr/bin/python setup.py build_ext --inplace
and
/usr/bin/python app.py
Thank you for helping. We did /usr/bin/python setup.py build_ext --inplace /usr/bin/python app.py and get
/home/mit10000n/temp/invesalius3_v2/invesalius3/invesalius/data/transformations.py:1899: UserWarning: failed to import module _transformations warnings.warn("failed to import module %s" % name) Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/_misc.py", line 1367, in Notify self.notify() File "/usr/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/_core.py", line 16868, in Notify self.result = self.callable(*self.args, self.kwargs) File "app.py", line 247, in Startup self.main = Frame(None) File "/home/mit10000n/temp/invesalius3_v2/invesalius3/invesalius/gui/frame.py", line 115, in init main_menu = MenuBar(self) File "/home/mit10000n/temp/invesalius3_v2/invesalius3/invesalius/gui/frame.py", line 773, in init self.init_items() File "/home/mit10000n/temp/invesalius3_v2/invesalius3/invesalius/gui/frame.py", line 984, in init_items modemenu.Append(-1,('Navigation Mode'),nav_menu) File "/usr/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/_core.py", line 12003, in Append return core.Menu_Append(*args, *kwargs) TypeError: String or Unicode type required Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/_misc.py", line 1367, in Notify self.notify() File "/usr/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/_core.py", line 16868, in Notify self.result = self.callable(self.args, self.kwargs) File "app.py", line 123, in Startup2 self.control = self.splash.control AttributeError: 'Inv3SplashScreen' object has no attribute 'control' Traceback (most recent call last): File "app.py", line 267, in OnClose if self.fc.IsRunning(): AttributeError: 'Inv3SplashScreen' object has no attribute 'fc'
I've updated the wiki. You have to use WXPython4:
sudo apt install python-wxgtk4.0
And export $PYTHONPATH to make Python use WXPython4:
export PYTHONPATH=$PYTHONPATH:"/usr/lib/python2.7/dist-packages/wxPython-4.0.1-py2.7-linux-amd64.egg"
Then just run InVesalius. I don't know if there is a wxpython4 package to Ubuntu 16.04, but you can install it using pip. If install using pip I think you won't need to export $PYTHONPATH.
Problem solved! Thanks!
First thanks for sharing!
We follow https://github.com/invesalius/invesalius3/wiki/Running-InVesalius-3-in-Linux
sudo apt-get install python-wxgtk3.0 python-numpy python-scipy python-pil python-matplotlib python-skimage python-nibabel python-serial python-psutil python-vtk6 python-vtkgdcm python-gdcm cython python-concurrent.futures python-configparser git clone https://github.com/invesalius/invesalius3 cd invesalius3/ python setup.py build_ext --inplace python app.py
get error: ModuleNotFoundError: No module named 'gdcm'