-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to use blender via cortex.segment.cut_surface #377
Comments
I haven't tried this on a mac, but it could be an issue about your path and mac os x. I don't think aliases get loaded within your python session. According to the blender docs (https://docs.blender.org/manual/en/latest/advanced/command_line/launch/macos.html) you can add the following to your PATH
however, annoyingly blender's command line in mac is called Blender instead of blender, so The easiest option for you (before we decide how to fix this to support both mac and linux) is to create a symlink to ln -s /Applications/Blender.app/Contents/MacOS/Blender ~/bin/blender and that might work. |
Thanks for the help!! I gave that a try and unfortunately blender doesn't seem to like opening via symlinks, same issue encountered as here: pelednoam/mmvt#190 I'm not tied down to mac so maybe linux is a better route until that is fixed. I actually first attempted to install in a singularity img (ubuntu, also tried centos) but was running into failed building wheel problems. Also tried an image on dockerhub (I think it was actually your image!) but seemed to be an older python 2 version and couldn't get it and jupyter,freesurfer quite working. I will ideally try to install pycortex in singularity again soon, do you happen to know if there is a recommended easiest or standard system and version to install? Like ubuntu xenial/ python3.x / etc? Or has anyone else run into failed building wheel problems and know of a solution? Probably some error on my end. |
Sorry for the slow response - this should be fixable on Mac, but unfortunately you will likely run into other problems once you fix it (see below). There is a field in the config file under the [dependency_paths] section in which you can specify the path to the binary executable file for blender. If you've never touched it, you can find the path to your config file by calling: This is actually spelled out in the default config file, here: https://github.com/gallantlab/pycortex/blob/master/cortex/defaults.cfg Of course: pycortex does not yet work with blender 2.8, much less with blender 2.9, because of changes in the blender python API from 2.7 to 2.8. You can work around this by downloading a legacy version of Blender (probably 2.79) from here and pointing the config file to the executable binary with that app package, wherever you put it. It is on my list to fix this (see #349), but I have two small kids and a pretty new lab of my own and there's a pandemic. So it may be a while. Apologies. |
Thanks for your response! Ah, I see, I missed that issue and didn't realize blender 2.79 was needed. Things seem to be working based on those changes, at least I am now in blender via segment.cut_surface and editing the surface! I did edit the config file earlier but was not aware of that default file with those comments. If I get this working/figured out and if it's ok, I will perhaps make a pr to the docs/installation instructions to add some of this info, as it was very helpful and I think would help others getting set up! |
I've been trying to use the cut_surface function but receive the following error:
FileNotFoundError: [Errno 2] No such file or directory: b'blender'
I've installed blender and also set up a bash alias for 'blender' to open my blender app. Has anyone else encountered this error or know a solution? I am running trying to run this w/ python 3.8 on Mac Mojave, Blender v2.90.1
Thanks!
More detail:
The text was updated successfully, but these errors were encountered: