I am using windows 7 (32bit) and python 2.7.3.
For gstreamer, I installed:
GStreamer-WinBuilds-LGPL-x86-Beta04-0.10.7
GStreamer-WinBuilds-SDK-LGPL-x86-Beta04-0.10.7
However, I get the following error:
ImportError: No module named pygst
And I was confused with previous similar questions and answers, anyway I can't fix this by copy files or rename dlls.
python-gst0.10 is only in extras-devel right now. You have to add this repository to your /etc/apt/sources.list:
http://repository.maemo.org/extras-devel
This should work. If it doesn't add a comment :)
OK. I tested these on win xp with python 2.7. It's absolutely OK!
Then I check again in win 7, after my installing of GStreamer. Python could not import pygsst, however as there is already PYTHONPATH for gstreamer. I just checked this enviroment variables in system variables, and I found python can import pygst ... Maybe it is the problem of WIN7, system permissions or delay? Have no idea...
Related
Nube at Python but application I want to use is written in it and I am having trouble getting this application to work.
I have been searching for answers but perhaps don't know enough to ask the right questions.
I am running windows 10 (new to it also). I have installed Python 3.10.1 from the Windows store. It is in the path statement and does execute from cmd prompt.
As my application uses YAML I have also installed PyYaml,
I have no idea if it installed correctly, where it is installed and it is not in the PATH.
My application called wireviz.py is launched from its source folder by typing wireviz -V. It fails at line 10 with ModuleNotFoundError: No module named 'yaml'.
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3
4 import argparse
5 import os
6 from pathlib import Path
7 import sys
8 from typing import Any, Tuple
9
10 import yaml
I know much more may be needed, but frankly I don't know
what and maybe even how to get it.
The error message indicates that PyYAML is not installed; since PyYAML is registered under the Python Package Index (PyPI) as yaml, you should install it using pip (the Python package installer). The command might look like this:
pip install yaml
There are many more nuances to learn about package installation, but for the time being this should get you up and running.
Problem solved thanks to Austin advise.
Because of it I did some research on Python Installer to get a better feel for the process.
Found my stuff was installed all over the place.
Found a pip package for my application so I deleted everything including Python and did a fresh install of Python and the "Graphviz" applications.
Then installed my application (WireViz.py) using pip install.
Application and all required modules installed without error and after checking PYTHONPATH, everything is now working.
Thanks for the help.
this might be a very stupid question but I'm a beginner.
I want to use this package called colorgram, it's a module that extracts colours from images, and I installed it using pip via the CMD. but when I try to import it in VS code it can't find it and I don't know what to do, please help
#Andrii Zadaianchuk
sorry, I'm using windows 10. I tried to import it in python in the CMD but nothing either, just the same ModuleNotFoundError: No module named 'colorgram' error.
I did just notice that the modules python version is 3.5 and VS code is running 3.9.2. I think that might be the problem
I am using python 3.5 and I am doing Algorithms specialization courses on Coursera. Professor teaching this course posted a program which can help us to know the time and memory associated with running a program. It has import resource command at the top. I tried to run this program along with the programs I have written in python and every time I received ImportError: No module named 'resource'
I used the same code in ubuntu and have no errors at all.
I followed suggestions in stackoverflow answers and I have tried adding PYTHONPATH PYTHONHOME and edited the PATH environment variable.
I have no idea of what else I can do here.
Is there any file that I can download and install it in the Lib or site-packages folder of my python installation ?
resource is a Unix specific package as seen in https://docs.python.org/2/library/resource.html which is why it worked for you in Ubuntu, but raised an error when trying to use it in Windows.
I ran into similar error in window 10. Here is what solved it for me.
Downgrade to the Apache Spark 2.3.2 prebuild version
Install (or downgrade) jdk to version 1.8.0
My installed jdk was 1.9.0, which doesn't seem to be compatiable with spark 2.3.2 or 2.4.0
make sure that when you run java -version in cmd (command prompt), it show java version 8. If you are seeing version 9, you will need to change your system ENV PATH to ensure it points to java version 8.
Check this link to get help on changing the PATH if you have multiple java version installed.
Hope this helps someone, I was stuck on this issue for almost a week before finally finding a solution.
I am using PyDev via eclipse and have used easy_install to get jsonpickle. No matter what I do I can't seem to get the import to work.
What I have tried thus far:
I have removed it from easy_install.pth and deleted the egg and installed again.
Add my python lib, dll, etc folders to a PYTHONPATH system variable
Restarted eclipse
Other imports are working fine. Not sure what I am doing wrong?
EDIT:
Sorry should have included OS / Python version.
OS: Windows 7
Python: 2.7
Any suggestions greatly appreciated
OS and python version?
Please use pip. Always.
pydev seems to ignore your package. It should be in /usr/share/pythonX.Y/site-packages/jsonpickle, or, if on Windows, c:\pythonxx[...].
If using Linux, please try to find a distro package for jsonpickle.
I've been trying to install PyQt 4.7 on Vista, but I am getting an ImportError when I try to do: from PyQt4 import QtCore, QtGui.
ImportError: DLL load failed: The specified module could not be found.
I've checked my System Path, and C:\Python31\Lib\site-packages\PyQt4\bin is on there.
I can't run any of the examples, but the Designer, Assistant and Linguist run fine.
I am using ActivePython 3.1, if that makes any difference. And I haven't had any previous version of PyQt installed.
Edit:
I've copied the QtCore4 and GtGui4 dlls to C:\Python31\Lib\site-packages\PyQt4. That fixes some of the examples, but I still can't use the example browser.
Are you sure there is a \bin directory for your version of PyQt?
I am running PyQt 4.4, and all my binaries are right in:
C:\Python31\Lib\site-packages\PyQt4
Which is what I have my path pointing too.
It sounds like PyQt4 was installed improperly... did you run this?
python setup.py install
There shouldn't be a bin there...
Just wanted to chime in that I had the same problem on a WinXP install of:
python 2.7
Qt 4.7.1 (10.05)
PyQt 4.8.1
I used the windows installer version of all 3 of those items.
Copying the contents of the C:\Python27\Lib\site-packages\PyQt4\bin folder up to the main PyQt folder (C:\Python27\Lib\site-packages\PyQt4) stopped the 'dll not found' errors that python was throwing.
Also chiming in. I installed both python 2.6 and PyQt 4.8.3 on a Windows 7 machine using the windows installers (I did NOT run 'python setup.py install').
I tried to run spyder (which requires PyQt 4.4 or greater) and failed because it couldn't find the PyQt .dlls. I copied all the .dlls from the \Lib\site-packages\PyQt4\bin folder to the \Lib\site-packages\PyQt4 folder, and spyder launches just fine.
PyQt installation also depends on the version of python installed on your platform.Python3.+ is incompatible with Python version < 3.x.
I was facing the same problem as I have Python 2.7 installed on my machine but I downloaded the latest binary which was PyQt-Py3.2-x86-gpl-4.9.exe. If you see here the binary has python version also mentioned in name after PyQt which is Py3.2. I uninstalled PyQt and installed PyQt-Py2.7-x86-gpl-4.9.exe which points to Python 2.7 and it fixed the problem.
Probably they could have mentioned the naming convention online or in some documentation to be more simpler.
I had the same problem. I got my program running from within Eclipse but when I tried running it directly from the command line I still got the same error.
I solved it by renaming the C:\Users\Me\AppData\Roaming\Python\Python27\site-packages\PyQt4 directory. (I'm guessing leftovers from a previous PyQt install)
I am using ActivePython.
I think there are at least two possible error conditions
1. ImportError: DLL load failed: The specified module could not be found.
then you have to check your PyQT version is comptible with your python. In other words, if you use python 3.3, then you can only use PyQT for python3.3 and python 3.3 will not work with PyQT for python3.4
This was the problem I met. I solved it with re-install it
2. Import Error: DLL load failed: %1 then something strange on a different encoding Win32.
then it would be a OS problem. If you use 32bit Python then you have to use 32bit PyQt, so do 64bit
Here's how I could fix those errors on Windows 7:
Get the PyQt4 wheel from
http://www.lfd.uci.edu/~gohlke/pythonlibs/#pyqt4.
Make sure that the version is exactly the same as your Python version (i.e. Python 3.3 doesn't work with PyQT for Python 3.4). Also make sure to download the 64bit version if you are on a 64bit machine and vice versa.
Extract the wheel with 7zip
Rename the PyQt4-4.11.4.data (or similar) directory to PyQt4
Go to PyQt4\purelib\PyQt4\ and move everything to the root PyQt4 folder. You can delete the purelib folder now
Copy the whole PyQt4 folder to your Python interpreters 'site-packages' folder (e.g. C:\Python34\Lib\site-packages)
Go to PyQt4\data\Lib\site-packages and move all the files to C:\Python34\Lib\site-packages\
In my case I needed MSVCP140.dll. I have solved this problem by dowloading Visual C++ Redistributable for Visual Studio 2015:
https://www.microsoft.com/en-us/download/details.aspx?id=48145
Got this solution from MSVCP140.dll missing
I am using Pyqt4 and Python 3.6 in Windows7.