Comments (5)
Good. Stack overflow is probably the best place to ask these questions: people are more responsive than me.
from mayavi.
Hi Yasser,
It seems that the Python that pip is using cannot import vtk. You checked
that you can successfully import vtk, but maybe you have different Python
executables install and pip is using a different one than the one with
which you can import vtk. Looking at your traceback, the Python that pip
uses is /usr/bin/python.
HTH,
Gaël
On Wed, Aug 29, 2012 at 10:40:26AM -0700, Yasser Souri wrote:
I want to use Mayavi.
Situation
• I use a MacBook Air, with OSX 10.7.3.
• I use pyhton 2.7.2
• I have virtualenv installed. But I have not used it for this installation.I've manually installed all it's dependencies, including VTK.
For VTK, I followed its installation guide and installed the python wrapper.
Now if I open a new terminal window and open python, I can import vtk without
any error.Problem
I try to install Mayavi with the following command:
pip install mayavi
But the following error occurs:
Downloading/unpacking mayavi
Running setup.py egg_info for package mayavi
build_src
building extension "tvtk.array_ext" sources
building data_files sources
build_src: building npy-pkg config filesno previously-included directories found matching 'artwork' no previously-included directories found matching 'docs/pdf'
Requirement already satisfied (use --upgrade to upgrade): apptools in /Library/Python/2.7/site-packages (from mayavi)
Requirement already satisfied (use --upgrade to upgrade): traits in /Library/Python/2.7/site-packages (from mayavi)
Requirement already satisfied (use --upgrade to upgrade): traitsui in /Library/Python/2.7/site-packages (from mayavi)
Requirement already satisfied (use --upgrade to upgrade): configobj in /Library/Python/2.7/site-packages (from apptools->mayavi)
Requirement already satisfied (use --upgrade to upgrade): pyface in /Library/Python/2.7/site-packages (from traitsui->mayavi)
Installing collected packages: mayavi
Running setup.py install for mayavi
Traceback (most recent call last):
File "", line 1, in
File "/Users/Yasser/build/mayavi/setup.py", line 498, in
**config
File "/Library/Python/2.7/site-packages/numpy-1.6.1-py2.7-macosx-10.7-intel.egg/numpy/distutils/core.py", line 186, in setup
return old_setup(**new_attr)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 152, in setup
dist.run_commands()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/Library/Python/2.7/site-packages/numpy-1.6.1-py2.7-macosx-10.7-intel.egg/numpy/distutils/command/install.py", line 57, in run
r = self.setuptools_run()
File "/Library/Python/2.7/site-packages/numpy-1.6.1-py2.7-macosx-10.7-intel.egg/numpy/distutils/command/install.py", line 31, in setuptools_run
return old_install_mod._install.run(self)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/install.py", line 573, in run
self.run_command('build')
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/Users/Yasser/build/mayavi/setup.py", line 303, in run
build_tvtk_classes_zip()
File "/Users/Yasser/build/mayavi/setup.py", line 290, in build_tvtk_classes_zip
gen_tvtk_classes_zip()
File "tvtk/setup.py", line 46, in gen_tvtk_classes_zip
from code_gen import TVTKGenerator
File "tvtk/code_gen.py", line 10, in
import vtk
ImportError: No module named vtk
Complete output from command /usr/bin/python -c "import setuptools;file='/Users/Yasser/build/mayavi/setup.py';exec(compile(open(file).read().replace('\r\n', '\n'), file, 'exec'))" install --single-version-externally-managed --record /var/folders/53/_trhc_0x0fb6kvx6bw_wrk500000gn/T/pip-Z4hpsW-record/install-record.txt:
running installrunning build
Traceback (most recent call last):
File "", line 1, in
File "/Users/Yasser/build/mayavi/setup.py", line 498, in
**config
File "/Library/Python/2.7/site-packages/numpy-1.6.1-py2.7-macosx-10.7-intel.egg/numpy/distutils/core.py", line 186, in setup
return old_setup(**new_attr)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 152, in setup
dist.run_commands()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/Library/Python/2.7/site-packages/numpy-1.6.1-py2.7-macosx-10.7-intel.egg/numpy/distutils/command/install.py", line 57, in run
r = self.setuptools_run()
File "/Library/Python/2.7/site-packages/numpy-1.6.1-py2.7-macosx-10.7-intel.egg/numpy/distutils/command/install.py", line 31, in setuptools_run
return old_install_mod._install.run(self)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/install.py", line 573, in run
self.run_command('build')
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/Users/Yasser/build/mayavi/setup.py", line 303, in run
build_tvtk_classes_zip()
File "/Users/Yasser/build/mayavi/setup.py", line 290, in build_tvtk_classes_zip
gen_tvtk_classes_zip()
File "tvtk/setup.py", line 46, in gen_tvtk_classes_zip
from code_gen import TVTKGenerator
File "tvtk/code_gen.py", line 10, in
import vtk
ImportError: No module named vtk
Command /usr/bin/python -c "import setuptools;file='/Users/Yasser/build/mayavi/setup.py';exec(compile(open(file).read().replace('\r\n', '\n'), file, 'exec'))" install --single-version-externally-managed --record /var/folders/53/_trhc_0x0fb6kvx6bw_wrk500000gn/T/pip-Z4hpsW-record/install-record.txt failed with error code 1 in /Users/Yasser/build/mayavi
Storing complete log in /Users/Yasser/Library/Logs/pip.log
Traceback (most recent call last):
File "/usr/local/bin/pip", line 8, in
load_entry_point('pip==1.1', 'console_scripts', 'pip')()
File "/Library/Python/2.7/site-packages/pip-1.1-py2.7.egg/pip/init.py", line 116, in main
return command.main(args[1:], options)
File "/Library/Python/2.7/site-packages/pip-1.1-py2.7.egg/pip/basecommand.py", line 141, in main
log_fp = open_logfile(log_fn, 'w')
File "/Library/Python/2.7/site-packages/pip-1.1-py2.7.egg/pip/basecommand.py", line 168, in open_logfile
log_fp = open(filename, mode)
IOError: [Errno 13] Permission denied: '/Users/Yasser/Library/Logs/pip.log'I think the problem is with vtk.
Can anyone help me?
Other Details
Running sudo pip install mayavi does not solve the problem.
I thought this might help
› which python
/usr/local/bin/python› python
Python 2.7.2 (default, Feb 17 2012, 13:57:55)
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin
Type "help", "copyright", "credits" or "license" for more information.import vtk
vtk
<module 'vtk' from '/usr/local/Cellar/python/2.7.2/lib/python2.7/site-packages/VTK-5.10.0-py2.7.egg/vtk/init.pyc'>My PYTHONPATH is empty.
—
Reply to this email directly or view it on GitHub.
Gael Varoquaux
Researcher, INRIA Parietal
Laboratoire de Neuro-Imagerie Assistee par Ordinateur
NeuroSpin/CEA Saclay , Bat 145, 91191 Gif-sur-Yvette France
Phone: ++ 33-1-69-08-79-68
http://gael-varoquaux.info http://twitter.com/GaelVaroquaux
from mayavi.
Thank you.
It's solved now.
from mayavi.
I have the same problem on Windows. pip is correct. Can anyone help?
By the way - there is no module with name 'vtk', only 'pyvtk'.
from mayavi.
install vtk on mac:
https://stackoverflow.com/questions/32853082/how-to-install-vtk-on-a-mac
from mayavi.
Related Issues (20)
- Github Actions core dumped
- Error 'Numpy is required to build Mayavi correctly, please install it first' when installing Mayavi HOT 4
- export to pov-ray or vrml not behaving as expected
- UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 45 HOT 5
- Broken support for signed integers in tvtk.TypeInt8Array
- Close GUI and Savefig HOT 1
- Mayavi does not support PEP517 HOT 1
- mlab.pipeline.surface is not displaying ply files correctly HOT 2
- install on python 3.9 failed HOT 4
- ImportError: Could not import backend for traitsui HOT 1
- Legacy-install-failure Mayavi, Python 3.10.6 HOT 3
- legacy-install-failure for Mayavi on multiple Python versions HOT 3
- sequences of mlab.show() and plt.show() HOT 1
- mayavi2 does not start - traceback traits.trait_errors.TraitError: Each element of the 'groups' trait of a Menu instance must be a Group or None, but a value of 'OpenGroup' <class 'str'> was specified. HOT 6
- Do not bundle tvtk_classes.zip in sdist
- 4.8.1: error: implicit declaration of function '_mm512_4fmadd_ps' is invalid in C99
- BUG: Not 3.11 compatible
- AttributeError: 'NoneType' object has no attribute 'active_camera' HOT 1
- mlab crashes on close()
- Plot ellipsoids with Mayavi
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mayavi.