-
Notifications
You must be signed in to change notification settings - Fork 285
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
Install with pip #1284
Comments
|
Just to know for guys who can stumble upon this: I used Python 3.10 + pip and it worked in usual way. But I suppose many things will migrate to newer versions at some point, so it is possible that 3.10 is only a temporary solution. |
I tried with Python 3.9.13, 3.10.11, 3.11.7, all failed. |
So here possibly all relevant packages and their versions:
Also, I dont remember if I installed mayavi with just 'pip install mayavi' or directly from github with 'pip install https://github.com/enthought/mayavi/zipball/master'. And before VTK install, maybe it is crucial to have VS build tools being installed. Get it with "Microsoft Visual C++ Build Tools". The latest link to that is actually here: https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019 Hope it will for for you! |
I was trying to follow the instruction to install mayavi from github: However there is no requirements.txt file in the mayavi folder. |
Thanks @HoloHolo-phys. Your method worked for me. Here are the exact commands I ran
|
I would say that 'src' error is likely related to C++ compiler that is supposed to build VTK/mayavi libraries. VTK is C++ thing originally and python package is only a wrapper. Double check that you have something like minGW and PATH things are fine. I think it should be automatically installed with "Microsoft Visual C++ Build Tools". |
I had the same issue with
This worked for me |
Thanks @patricioastudillo ! Here is the way to install by uv: [project]
name = "my-project"
version = "1.0.0"
requires-python = "~=3.12.0"
dependencies = [
"mayavi",
]
[tool.uv.sources]
mayavi = { git = "https://github.com/enthought/mayavi.git" } Succeed on macOS (M1 chip) and Ubuntu. |
Unable to install on conda with 3.13. The workaround
allowed me to install, but I could still not import properly, with the error message shown below. Is there a way to fix this issue?
|
I apologize for the quite dump question, but I believe this is an issue that people stumble upon recently, and I could not find any reliable answer so far. I basically struggle to install everything correctly.
I think everything was and is quite straightforward if you use python 3.10. But at the moment it is almost retro and many want to use 3.11 at least. And install python 3.10 is not an obvious thing for not expert - it is now in security mode and the usual installer is not provided. The second thing is 'numpy migration thing' associated with deprecated 'distutils'. Simultaneously, it is not clear how important the vtk updates are. So as I view it, several important things are interconnected and if any of them is not supported by others, then nothing is working. The amount of possible errors are numerous.
However, I expect that there exist a proper set of versions for mayavi, python, vtk and numpy and everything else which would work for anyone. Can someone advise how to install it in a normal way with pip? Because the python 3.11 + pip install vtk + pip install mayavi is not working for me. And 10 other combinations which I already tried. Also, just to mention: I have installed VS build tools which are important for vtk and other things as well. So I pretty sure that my problem is about versions. Also I tried to install mayavi with: pip install https://github.com/enthought/mayavi/zipball/master. It helped but it seems like this is not a stable version of mayavi but something currently developing. It occasionally crash because of some conflicts with vtk/numpy. Like the same script can work or not completely at random.
I am also aware that possibly the conda is more supported way of installation. But unfortunately, the conda package channels are limited, I still need ~10 other packages from PyPl libraries. And if I will mix the conda and pip environments, this will be a mess and completely different problem. In any case, if you will advise using conda, I will try to dig in this direction.
Thank you very much in advance.
The text was updated successfully, but these errors were encountered: