pypes | component based data flow framework with a drag-n-drop Web | Reactive Programming library
kandi X-RAY | pypes Summary
kandi X-RAY | pypes Summary
A component based data flow framework with a drag-n-drop Web 2.0 interface. Based on Stackless Python and inspired by Yahoo! Pipes.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of pypes
pypes Key Features
pypes Examples and Code Snippets
Community Discussions
Trending Discussions on pypes
QUESTION
I'm working with a module called VMTK to build scripts for analyzing vascular models. They have a tutorial for writing these scripts so they're easily identifiable by the system allowing you to pipe scripts together known as PypeS. I've followed the tutorial exactly as shown and end up with the same "No module named: vmtk.name_of_script" error.
What I've tried:
- Putting the script in the same directory as all the preloaded scripts provided by the module so
__init__.py
could catch it - Copy-pasting the code from the website into my editor so I'm sure there are no errors in what I've written
- Submitting the question directly onto the forum meant for questions about VMTK, with no responses for the past week and a half
- Changing my Python interpreter to the one within the VMTK directory
The tutorial says you can put the custom script anywhere in your filesystem, but the issue arises no matter what. I'm currently using Python 3.6.10 through Anaconda and a binary install of VMTK (as opposed to building from source) on MacOS High Sierra.
I really don't want to have to build from source, as I only need the preloaded scripts and ability to write new scripts, as opposed to using the C++ files that the scripts are built from. I've been stuck for so long and am not at all sure what the issue is. The closest thing I found was an SO question addressing this problem, but the OP simply said the problem had been resolved and provided no other information.
Here's the aforementioned code:
...ANSWER
Answered 2020-Jul-29 at 02:50The solution I found after a week of trying and searching:
git clone
the vmtk repo onto your computer and follow the VMTK download instructions on how to build it from source. It will absolutely feel like a headache and be a long process; just wait it out.- If you don't have cmake installed on your computer, they offer a GUI version on their website. I'm not sure how it would work for Windows, but it definitely works for Mac.
Once you've built it, make sure that each terminal instance of VMTK you set
source vmtk_env.sh
from the path where that file is. This will allow you to use the VMTK environment.After writing the custom script, making sure to follow all the directions in the tutorial (assuming this is the first time), make sure to save it in the "site-packages" folder in the build folder. The path for me is "vmtk-build/lib/python-2.7/site-packages/vmtk/". I'm currently looking to update the version of Python it's using, but that's not the point.
Once that's done, navigate to that folder from within terminal and run
chmod u+x name_of_script.py
(if you're in a Unix-based operating system). This will allow you to execute the file with./name_of_script.py
.I believe it was due to the version of Python VMTK is using, but I had two "No module named" errors come up, each one a separate time: one for
tkinter
and one forjoblib
.The
tkinter
issue is one that can be resolved by going into the file where the import is, I believevmtkscripts.py
, and changing all instances oftkinter
toTkinter
(capital T). This is because they changed the name of the module from Python 2 to 3, so in newer versions of Python it would betkinter
. That fixed the first error.When I attempted to fix the
joblib
issue, I saw that the other version of Python available on my system already had it, thus I couldn't install it through pip. Instead, you can dopython-2.7 -m pip install joblib
to install it for a specific version of Python. Although I did uninstalljoblib
as a whole from my computer before doing that.
That should fix everything. The next time I attempted to run my script, it ran without any errors.
Extra: I wasn't using any Anaconda environment for this. Might go back and try to set that up, but I'm just glad I got it to work. Additionally, I deleted the binary install of VMTK from my computer. No need to keep it around if you're just going to build it from source. You can run VMTK through the terminal after setting source vmtk_env.sh
by running the vmtk
command.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install pypes
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page