Closed liorgolgher closed 4 years ago
Hi Lior, I hope you're doing great as well! That's weird, I tried to reinstall and test, and it is working! Can I know how you did install and what is the python version in your installation? Best, Rafat
I'm glad to hear you're well!
I took the following installation steps:
conda create -n vg python=3.7 spyder matplotlib scipy networkx=2.2 mayavi
conda activate vg
git clone https://github.com/Damseh/VascularGraph.git
cd VascularGraph
python setup.py install
The resulting python version is 3.7.6. The only warning I've got during the cloning step does not seem to be related:
warning: the following paths have collided (e.g. case-sensitive paths
on a case-insensitive filesystem) and only one from the same
colliding group is in the working tree:
'build/lib/VascGraph/Extra/Example.py'
'build/lib/VascGraph/Extra/example.py'
'VascGraph/Extra/Example.py'
'VascGraph/Extra/example.py'
Since it works for you, I suspect that it has to do with my system. I therefore erased VascularGraph folder, fully uninstalled my anaconda, installed the latest Miniconda3 (Python 3.7 for Windows 64-bit) and conducted the steps above afresh. Alas I got the very same syntax error in line 780.
If it's any help, I'm using Windows 10 version 1909, build 18363.720 on this machine.
I did not have this issue on Linux or Mac, but that was before the latest VG commit (6f7fb54).
Thanks again, Lior
Hi Lior,
The 'Extra' sub-package contains some functions and routines that are not important for the skeletonization in demo.py module. I used to have them first when I started to develop my algorithm.
After cloning, try to remove the 'Extra' folder from VascularGraph/VascGraph and from VascularGraph/build/lib/VascGraph, then install
python setup.py install
So the installation steps will be:
conda create -n vg python=3.7 spyder matplotlib scipy networkx=2.2 mayavi
conda activate vg
git clone https://github.com/Damseh/VascularGraph.git
cd VascularGraph
rm -R VascGraph/Extra/ build/lib/VascGraph/Extra/
python setup.py install
Removing the extra folders has resolved the issue I've reported, but not the real problem that prevented VG from running on my system. The resulting traceback after removing the folders was:
Traceback (most recent call last): File "demo.py", line 18, in
import VascGraph as vg File "C:\Users\LENOVO\Downloads\VascularGraph\VascGraph__init.py", line 10, in from VascGraph import GraphLab File "C:\Users\LENOVO\Downloads\VascularGraph\VascGraph\GraphLab\ init__.py", line 9, infrom VascGraph.GraphLab.GraphPlot import GraphPlot File "C:\Users\LENOVO\Downloads\VascularGraph\VascGraph\GraphLab\GraphPlot.py", line 10, in from mayavi.core.api import Engine, PipelineBase File "C:\Users\LENOVO.conda\envs\vg\lib\site-packages\mayavi\core\api.py", line 5, in from .pipeline_base import PipelineBase File "C:\Users\LENOVO.conda\envs\vg\lib\site-packages\mayavi\core\pipeline_base.py", line 13, in from mayavi.core.base import Base File "C:\Users\LENOVO.conda\envs\vg\lib\site-packages\mayavi\core\base.py", line 19, in from tvtk.pyface.tvtk_scene import TVTKScene File "C:\Users\LENOVO.conda\envs\vg\lib\site-packages\tvtk\pyface\tvtk_scene.py", line 19, in from apptools.persistence import state_pickler File "C:\Users\LENOVO.conda\envs\vg\lib\site-packages\apptools\persistence\state_pickler.py", line 1210 ^
SyntaxError: invalid syntax
The solution I've been overlooking for the past week can be found here: remove the __pycache__
subfolder of the relevant persistence folder reported in the error log (e.g. 'C:\Users\LENOVO.conda\envs\vg\lib\site-packages\apptools\persistence__pycache__'), then reinstall apptools through pip: pip install -U apptools
I hope this transcript assists other VG users.
VG works now on my laptop! I apologize for wasting your time on the wrong problem. Thanks a lot for your continued help!
No problem! I am glad that it works now. All the best
Hi Rafat,
I hope the lockdown finds you well (:
I've tried to install the updated version of VG on another computer and faced the following error during setup:
I guess the same error holds for line 788. I've failed to replace them myself with
except ValueError as e:
Can you please direct me to the file I should modify, or ping me when a modified package is available?Thanks! Lior