how to install the 'pysparse' package using Enthought python, Windows XP SP3? - python

I am running on a Windows XP SP3 and currently have fresh installations of the following:
Enthought python Dist. version 7.1-2 (32-bit)
--> which set up a Python 2.7.2
pysparse-1.1.1.win32-py2.7.exe downloaded from - http://www.lfd.uci.edu/~gohlke/pythonlibs/#pysparse
microsoft visual studio 2010
I need pysparse inorder to install and use 'fipy'.
From some reason any attempt include a .pyd file from pysparse e.g :
>>> from pysparse import jdsym
ends with the following :
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: DLL load failed: The specified module could not be found.
I should point out that installing other packages from the same link and including .pyd files worked fine.
Any help would be incredibly great.

You can download the compiled Pysparse library for Windows system from the following website:
http://www.lfd.uci.edu/~gohlke/pythonlibs/
Then just by running the related EXE file you can install the pysparse and import to your code.

Related

ImportError Pyo

I'm trying to import pyo in python3.8.8 and I'm not getting any results. When I try to run the command:
Traceback (most recent call last):
File "<pyshell#0>", line 1, in
import pyo
File "C:\Users\andre\AppData\Roaming\Python\Python38\site-packages\pyo_init_.py", line 28, in
from .lib import analysis as analysis
File "C:\Users\andre\AppData\Roaming\Python\Python38\site-packages\pyo\lib\analysis.py", line 32, in
from ._core import *
File "C:\Users\andre\AppData\Roaming\Python\Python38\site-packages\pyo\lib_core.py", line 58, in
from .._pyo import *
ImportError: DLL load failed while importing _pyo: Impossibile trovare il modulo specificato.
How can I solve this?
I assume you are on windows. What version of pyo do you have installed? I saw that it was only version 1.0.1 that python 3.8 support was introduced. Try uninstalling pyo, then make sure you install the newest version. Also, did you install with pip? If you did, try installing from their downloadable releases on github. What code did you write that caused this error? I need to see your code.
Looks like you're using pc032 (032bit) Python. Last PyO version with pc032 (on Win) support is [PyPI]: pyo 1.0.1 (from 191127). But I didn't see the Python 3.8 .whl among files (neither for a couple of older versions).
Just out of curiosity: how did you install PyO?
In order to get things going either:
Switch to pc064 (064bit) Python
Use a (pc032) Python version that prebuilt .whl exists for
I've built v1.0.4 (latest at answer time) and placed the .whls at [GitHub]: CristiFati/Prebuilt-Binaries - (master) Prebuilt-Binaries/PyO/v1.0.4. Download and install the preferred one (check [SO]: Installing pygraphviz on Windows 10 64-bit, Python 3.6 (#CristiFati's answer) (at the end) for more details about the process)

Configuration of vtk in Python in Windows

I've installed vtk from vtkpython-6.3.0-Windows-64bit.exe in C:\Program Files\VTK 6.3.0 of my computer. Then I add C:\Program Files\VTK 6.3.0\bin to my Path and C:\Program Files\VTK 6.3.0\bin as well as C:\Program Files\VTK 6.3.0\bin\Lib\site-packages to my PYTHONPATH in system variables. When I run IDLE (Python GUI).exe of Python and input import vtk,it shows:
>>> import vtk
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import vtk
File "C:\Program Files\VTK 6.3.0\bin\Lib\site-packages\vtk\__init__.py", line 39, in <module>
from vtkCommonCore import *
ImportError: No module named 'vtkCommonCore'
>>>
What mistake did I make?
Please help me of this.
Are you sure that you set the environment variables correctly? For example , be careful with quotes (aka don't put them).
I installed VTK 7 in Y instead that in program files (probably not a good choice since the built in vtkpython doesn't work), and the following setting for me works:
C:\Users\lib>set PATH=Y:\VTK 7.0.0-RC2\bin;%PATH%
C:\Users\lib>set PYTHONPATH=Y:\VTK 7.0.0-RC2\bin\Lib\site-packages
C:\Users\lib>python -c "import vtk;print vtk.__file__;print vtk.vtkVersion().GetVTKVersion()"
Y:\VTK 7.0.0-RC2\bin\Lib\site-packages\vtk\__init__.pyc
7.0.0
In case of problems, try to add also C:\Program Files\VTK 6.3.0\bin\Lib\site-packages\vtk to PATH (there are dlls in it as well)
After having the same problem, I gave in and installed the Anaconda python distro. Anaconda has VTK all packaged for download and ready to go. Remember that VTK supports python 2.7.
Edit:
Apparently VTK now supports python 3.6
Are you using a 32bit or 64bit version of Python?
VTK seems to be only available for 64bit python installation under Windows. If you can, try installing the 64bit version of Python instead of the 32bit version.
The default download from python.org seems to be the 32bit version of Python.

'ImportError: DLL load failed:' in pygame module

Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import pygame
File "C:\Program Files (x86)\Python35-32\lib\site-packages\pygame\__init__.py", line 127, in <module>
from pygame.base import *
ImportError: DLL load failed: The specified module could not be found.
Ensure that the version of PyGame you're using matches the version of Python you're using!
You have not installed Pygame correctly or not in the correct directory/file. What python version do you use and is your computer 32/64 bit?
Thx
This is a late answer, but may be it helps someone.
The pygame binary you use should be built for the Python version you have in your system.
In your case, you seem to have 32-bit Python3.5.
There is no official pygame binary for Python3.5 yet. But unofficial binaries are available here.
Download pygame-1.9.2b1-cp35-cp35m-win32.whl from the link (this is the 32-bit version for 32-bit Python3.5), and install it using pip.
Example: cd to the folder where you downloaded the .whl file, and run C:\Program Files (x86)\Python35-32\Scripts\pip install pygame-1.9.2b1-cp35-cp35m-win32.whl
Note:
pip may not play well when the python install directory has spaces. So please install python in a path without spaces. For example, C:\Python35-32 instead of C:\Program Files (x86)\Python35-32.
Also, see this answer in case you need more info on installing .whl files.

Lost module while installing opencv 2.4.9 for python in Windows

I try to install opencv from source. I use Visual studio 2010, python 2.7.8 and make steps like here.
The problem is that when importing cv2 I get error:
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import cv2
ImportError: DLL load failed: The specified module could not be found.
There are following cv-files in the C:\Python27\Lib\site-packages:
cv2.pyd
cv.py
cv.pyc
I also have Python 3.4.1 but CMake doesn't see that, so I think it is not the reason.
But CMake has just two lines in the PYTHON group:
PYTHON_NUMPY_INCLUDE_DIR C:/Python27/lib/site-packages/numpy/core/include
PYTHON_PACKAGES_PATH C:/Python27/Lib/site-packages
Here's what my install of OpenCV for Windows, built with MinGW for C++ includes.
It's not actually an install - the folder can be zipped and put on any computer, provided you specify to CMake the paths.

No module named win32console, while running wexpect

I want to run wexpect (the windows port of pexpect) on my Windows 7 64-bit machine. I am getting the following error:
C:\Program Files (x86)\wexpect\build\lib>wexpect.py
Traceback (most recent call last):
File "C:\Program Files (x86)\wexpect\build\lib\wexpect.py", line 97, in <module>
raise ImportError(str(e) + "This package was intended for Windows like operating systems.")
ImportError: No module named win32console This package requires the win32 python packages.This package was intended for Windows like operatin
g systems.
In the code it is failing on the following line:
from win32console import *
I am using Python 2.6.4. I cannot figure out how to install win32console.
Install this: http://sourceforge.net/projects/pywin32/
Edit to add slightly longer explanation: There's a very useful set of Windows-specific Python modules, called PyWin32. I believe win32console is part of that. You can either install PyWin32 on top of the standard python.org release of Python, or you can install ActiveState ActivePython which bundles everything you need all together. I'm using ActivePython and I have a win32console module.
Install wexpect with pip to install all dependencies (inluding pywin32).
pip install wexpect

Categories