Importerror no module named vtk - python

I'm trying to run a Python.py file with:
import vtk
but, I get the error:
Traceback (most recent call last):
File "CYLINDER.py", line 6, in
import vtk
ImportError: No module named vtk
Steps I've taken:
Compiled VTK 7 following these instructions: http://www.vtk.org/Wiki/VTK/Building/Windows#Step_7_-_Manual_building (no failures)
Changed PYTHONPATH variables: http://www.vtk.org/Wiki/VTK/Tutorials/PythonEnvironmentSetup
Currently running Python 2.7.11 32-bit, compiled using CMake and Visual Studio 2010, and using cygwin for windows
Thank you in advance for your help.

Related

julia.install() fails on python import error

I am trying to run a Julia script from python. I have Julia 1.6.4 installed (also tried 1.7.3) and installed pip install julia from Pycharm's terminal in the virtual environment. When importing julia and then running julia.install() I get the following error message:
I use Pycharm with a virtual environment with Python 3.9.7 for my project. However, I have also tried different python versions in different virtual environments or by using the base python installed. All give the same error.
Also, ~/.julia/packages/PyCall/*/deps/build.log does not exist for me.
[ Info: Trying to import PyCall...
Fatal Python error: init_import_size: Failed to import the site module
Python runtime state: initialized
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\lib\site.py", line 73, in <module>
import os
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\lib\os.py", line 29, in <module>
from _collections_abc import _check_methods
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\lib\_collections_abc.py", line 12, in <module>
GenericAlias = type(list[int])
TypeError: 'type' object is not subscriptable
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "C:\Users\<user>\PycharmProjects\<project>\venv\lib\site-packages\julia\tools.py", line 118, in install
raise PyCallInstallError("Installing", output)
julia.tools.PyCallInstallError: Installing PyCall failed.
** Important information from Julia may be printed before Python's Traceback **
Some useful information may also be stored in the build log file
`~/.julia/packages/PyCall/*/deps/build.log`.```
Julia needs to have PyCall installed
PyCall in Julia needs to be configured to use the same Python that you are using to call Julia from
For more information see this post:
I have a high-performant function written in Julia, how can I use it from Python?

ImportError: No module named 'xlwings' using Anaconda Python Distribution in Windows 7

I'm trying to learn xlwings for in Windows 7 but I get the following error when importing the xlwings module in python IDLE
>>> import xlwings
Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
import xlwings
ImportError: No module named 'xlwings'
>>>
I installed Python using the Anaconda distribution and path variable correctly includes the site-packages
C:\Users\xxx\Anaconda3\Lib\site-packages;
I'm using Excel 2013. Any ideas?

Python ImportError: DLL load failed: The specified module could not be found

I recently downloaded and installed pygame. I tested it with the following code.
import pygame
I received the following error:
C:\Python34>python test.py
Traceback (most recent call last):
File "test.py", line 1, in <module>
import pygame
File "C:\Python34\lib\site-packages\pygame\__init__.py", line 95, in <module>
from pygame.base import *
ImportError: DLL load failed: The specified module could not be found.
I currently have Python 3.4 32 bit and have downloaded pygame-1.9.2a0.win32-py3.2 and installed it. I tried uninstalling and reinstalling multiple times. What am I doing wrong?
Pygame doesn't work for Python 3.4. The pygame that you downloaded is for Python 3.2. If you download Python 3.2, you should be able to use pygame.

Pygame installation error

I have installed Python 3.4.0 on a Win Vista Home Premiun 32bit machine with "Service Pack 2" installed.
Python installed to C:\Python34
I then chose the pygame windows binary pygame-1.9.2a0.win32-py3.2 since this is the closest to Python 3.4.0.
When in the shell or via a .py file and I use from pygame import *, I get the following error:
*Traceback (most recent call last):
File "C:/Users/Stuart/Desktop/Python Project files/g.py", line 1, in <module>
from pygame import *
File "C:\Python34\lib\site-packages\pygame\__init__.py", line 95, in <module>
from pygame.base import *
ImportError: DLL load failed: The specified module could not be found.*
I found a pygame install for python 3.4 at http://www.lfd.uci.edu/~gohlke/pythonlibs/

How to install the Pyinstaller on Win 7

I am using win7 to install the PyInstaller.
I have tried the method accroding to (How to install PyInstaller? )but I failed and there is the log,is there anything wrong?
C:\Python27\pyinstaller-2.0\PyInstaller>python Configure.py
Traceback (most recent call last):
File "Configure.py", line 28, in <module>
from PyInstaller import HOMEPATH, PLATFORM
ImportError: No module named PyInstaller
Thanks!
Try going to the system properties and go to the environment variables and set the PATH to the address of where the pyinstaller is located.

Categories

Resources