I tried to run example PythonFullExample from https://github.com/acbauer/CatalystExampleCode
I have installed paraview, vtk and mpi. Why do I get no module called vtkParallelPython error.
I'm using ubuntu 12.04.
Currently you need to run this Python example with a build directory of ParaView instead of an install directory.
Related
I am building a desktop app using Python and PySimpleGUI. So far, everything works just fine. Whilst I was working at the project, I realized I need to find a way to get the duration of some mp3 files and to display it in a certain way. I discovered mutagen module that is supposed to help me in this sense, I installed, and here the problem arise:
It throws me ModuleNotFoundError: No module named 'mutagen'.
Seeing this, I started to look for the problem, but I couldn't not understand why my interpretor did not find the module even though I Installed it CORRECTLY. (as PyCharm told me)
I have tried the following:
I am using a local virtual environment that has installed the dependecies for the project(and some extra) and I uninstalled and installed the package 3-4 times
I deleted the local virtual environment and I created another one. I installed the packages again and same issue.
I installed a random module (scipy) and I tried to import it somewhere in the project and it thrown me same error, but this time for scipy module
My guess is that I did not configured properly my interpreter, but to be honest, I have no idea what I am doing wrong, because I followed the same steps I've been using for creating a venv with its according interpreter and for other projects, it worked just fine.
Further details:
Using python3.9 base .exe
I installed the packages in two ways: one using the pycharm IDE, and one by running pip3 install mutagen
You may be using a different pip that is not the one that affects the Python you are using. Instead of using
pip install mutagen
Consider using pip as a module of the Python you are using:
python -m pip install mutagen
This way you'll be sure you are working on the same Python.
If you want to continue using plain pip, try which python and which pip to make sure they are referencing the same environment.
I've seen through the web that .exe taken from python scripts may often run into errors because of some "hooks missing", which happens because pyinstaller wasn't able to track some modules while creating the .exe file. I'm currently using Python IDLE 3.61 and the scripts works fine without any error. The .exe actually runs but, for instance, it simply crushes when I try to plot a table giving the error:
NoModuleFoundError: 'No module=plotly.validators.table found'.
Building the .exe also via cx_Freeze, I came up to the same sort of problem:
Module plotly.validators.table has no Attribute CellsValidators
which confirmed me the problem is caused by issues with plotly.
Uninstall plotly module.
Install older version of plotly module.
Now try building .exe file
(If not working again, try further more old versions of plotly)
I hope it works.
I have created a python program and want to compile it to .exe file in python 3.6.
As pynput is not yet supported for python 3.6, I used cx freeze.
It compiles the program without any error but the problem I'm getting is, I want to compile my .py program into only one single .exe file, but cx freeze creates a build folder with lots of folders in it. Without those folders, the exe file is not running.
How to solve this?
According to the documentation
cx_Freeze does not support building a single file exe, where all of
the libraries for your application are embedded in one executable
file.
So, I'll advice you to use pyinstaller.
pip install pyinstaller
pyinstaller -y -F pythonfile.py
Or if you prefer gui try auto-py-to-exe
pip install auto-py-to-exe
I used a virtualbox with ubuntu-16, to install caffe in python 2.6. As I wanted to use py2exe, I needed to change python version to 3.6. When this was done, caffe import code stopped working. Here is the error message:
ImportError: libcaffe.so.1.0.0-rc5: cannot open shared object file: No such file
or directory
Do I have to rebuild caffe? Or is something else that need to be changed?
Here is the full image of the error:
Yes, you need to rebuild Caffe. The Python 2 and Python 3 libraries are not compatible. Not all of the file names are the same (different / added software organization). This rebuild requires that you place a single version of Python first in all search paths: make, compile, load, ...
When I need to do this, I check with my SysOps: there's always something I forget.
In the Python 3 docs, it states that the dbm module will use gdbm if it's installed. In my script I use from dbm.gnu import open as dbm_open to try and import the module. It always returns with the exception ImportError: No module named '_gdbm'. I've gone to the gnu website and have downloaded the latest version. I installed it using
./configure --enable-libgdbm-compat, make; make check; make install, and it installed with no errors. I can access the man page for the library but I still can't import it into Python 3.5.2 (Anaconda). How do I install the Python module for gdbm?
I got similar issue though I am not sure which platform you are using.
Steps are:
look for file _gdbm.cpython-"python version"-.so example file: _gdbm.cpython-39-darwin.so
Once you find the path check which python version in directory path.
Try creating same python venv.
Execute your code.
Before this make sure you have install appropriate gdbm version installed on host machine, for mac it's different for ubuntu it's different name.