Skip to content
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

When Python 2 and 3 are installed, Mayavi wont work #655

Closed
Hendrik410 opened this issue Jun 17, 2019 · 0 comments · Fixed by #656
Closed

When Python 2 and 3 are installed, Mayavi wont work #655

Hendrik410 opened this issue Jun 17, 2019 · 0 comments · Fixed by #656

Comments

@Hendrik410
Copy link

I have encountered the following problem:
I have a system on which python 2 and 3 are both installed, but python3 is the default runtime (python links to python 3).

FiPy is installed for python2, so is mayavi. The problem is, that the lines, that loads the mayaviDeamon.py file (mayaviClient.py line 71 to 81) uses the default python interpreter.

from pkg_resources import Requirement, resource_filename
daemon_file = (daemon_file or resource_filename(Requirement.parse("FiPy"),
                                            "fipy/viewers/mayaviViewer/mayaviDaemon.py"))

cmd = ["python",  daemon_file,  "--lock", self.vtklockfname, "--fps", str(self.fps)]

I managed to overcome this problem by changing the first element of this list with python2.
I think the correct way to do it, is to use sys.executable to get the current interpreter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants