I have recently stated a arduino project for my engineering class. I mange to get python to talk to arduino via serial communication. Now I can send data to the board, I want to be able to set up a graphical user interface GUI with GTK, so that the user and push a button in the GUI and a LED turns on. However, I am trying to install the GTK liberty and I am running into a lot of problems.
Problem:
I download GTK via pyip, when I run the set up file in the command line it says
you have to install pyobject. So i went back to pyip and download the pyobject module and run the set up file. When I run the set up file I get this error message "ERROR: Could not find pkg-config: Please check your PATH environment variable." I downloaded the pyconfig from pyip ran it and the set up ran fine. But when i went to install pyobject I keep getting this error. Can someone direct tell me how to install GTK properly or how to fix my problem.
PS I try setting my windows environment to the location of my pkg-config file.
Error from Installer
CMD error :
Help would be deeply appreciated
Thanks
Sean From Boxing Studio Games
I would suggest that you use the latest all-in-one installer for pyGTK. You can find it here.
It should automagically install all of the dependencies for pyGTK.
I believe that your problem is that you're trying to find non-Python prerequisites via pip.
You say "I download GTK via pyip", I don't know any package manager named pyip. If you mean pip, that only installs Python packages; it doesn't help get the DLLs and other files that are needed to build those Python packages. In particular, to install the Python bindings for Gtk+ and do anything useful with them, you have to have Gtk+ itself. You can get a nice installer package from the Gtk website.
Also, you have to be precise with names. If you're missing pkg-config, installing something called pyconfig isn't going to help; they have nothing to do with each other. Similarly, pip is the Python package installer; pyip is a library for dealing with raw IP packets; they have nothing to do with each other.
At any rate, the Gtk+ binaries should have all the prerequisites you need. Then pip should be able to install the Python bindings… assuming you have a compiler set up properly. But somehow, I have a feeling that you don't have one set up, and don't know how.
Fortunately, Christoph Gohlke's repo has prebuilt binary wheels for almost anything you could want in Python that's hard to build for Windows. Just download the .whl files you need from that package, and follow the instructions on the page to install them with pip.
Related
I am trying to install pycurl module in Thonny virtual environment but without any luck..
Whatever I try, I am getting the same error message:
Please specify --curl-dir=/path/to/built/libcurl
I have previously installed this module on my Raspberry PI linux and did not have any issues whatsoever. Seems like a lot of people are having issues installing it on Windows Machine and there is still no clear solution to this.
According to the official pycurl website:
http://pycurl.io/docs/latest/install.html#windows
I should be able to install pycurl by using pip install pycurl. That is not the case unfortunately.
Also, they provide a link that is not working:
Clicking on the link returns "Forbidden".
Hoping to get some clarification. Thanks in advance.
If you want to install the current version, you need to build it from source.
You may be able to find a binary of a previous version to install through pypi.
I tried installing Pyaudio in Python but Python says it requires Portaudio binding for the installation.Help me fix this please.My platform is Windows.I am using Python 3.7.2.
I did:
1.I followed the instructions provided in the portaudio website and generated dll file using visual studio.
The portaudio directory where the compiled files are located is my Desktop.
2.Anyway I have installed pyaudio using a setup(exe) file which i found somewhere.
So whenever i type the command "pip install pyaudio", it says the requirements are already fulfilled.
But when i use the alternative command "easy_install pyaudio",it shows an error related to portaudio.
3.And whenever I run a python file which uses pyaudio it again says binding is required.
So, I need the solution to bind Portaudio files which are in my desktop with python.
I searched everywhere for the solution but since I am a beginner, all the tutorials provided in different websites were hard to understand for me.
So please help me with a simple and descriptive solution.
Thanks in advance.
ouch, it seems like you have chosen a painful way to get pyaudio installed.
I never compile on windows, if I can't find a pre-compiled binary I will look around for a different way to get to where I want to (different library…)
you can uninstall with pip uninstall pyaudio
anyways, here's one way to get it working.
download and install a "miniconda" (google if you don't know what it is)
do conda install pyaudio in your "conda"-prompt
I did not truly check the install, but I did the conda install… and it would have installed both portaudio and pyaudio so I suppose it will work.
I'm borrowing my friends mac and I've tried following instructions of installing python and pygame using homebrew and all that. Specifically following this video: https://www.youtube.com/watch?v=L0Cl4Crg7FE
And this post: http://www.reddit.com/r/pygame/comments/2bsqe4/installing_python3_and_pygame_os_x_mavericks_and/
I've successfully managed to install python 3.4.1 and a version of pygame from https://bitbucket.org/pygame/pygame
So I now start to test my program to see if it works. But it doesn't because it says pygame has no pygame.movie module, which I am using to play a video.
I've done all of my programming on my windows7 computer using python 3.4.0 and pygame version 1.9.2a0, and it worked perfectly fine. Anyone know how I can solve this problem?
According to the README on the github repo you linked:
You should definitely begin by installing a binary package for your system. The binary packages usually come with or give the information needed for dependencies. Choose an appropriate installer for your system and version of python from the pygame downloads page. http://www.pygame.org/download.shtml
And that line that I bold-faced seems to be the root of your problem: You didn't install the dependencies, so you don't have video support, so when you built from source, it skipped pygame.movie.
Unfortunately, they only have binaries for Python 2.x, and only for older versions of OS X, which means you can't actually follow those instructions, and you're doing the right thing by building it manually.
I don't see where they list these dependencies on the download page. There's a link to Installation Notes, but it's a 404. And the README in the BitBucket repo doesn't list them either. (I'm not 100% sure BitBucket is the right place to look—the download page sends you to an svn repo, which sends you to the BitBucket repo, but the GitHub repo looks newer and just as official—but the GitHub repo has the same info…)
So… you may need to read through config_darwin.py and config_unix.py. But my first guess is that it's SMPEG or maybe avformat that you're missing, because SMPEG is how you display video in SDL, and avformat is how you convert video from other formats to something SMPEG can handle. So, if you don't have those, use Homebrew or the SDL.org binary installers or whatever you prefer to add them, then clean-rebuild PyGame.
Did anybody manage to install pypotrace or is able to install mingwin it's like mission impossible for me I've passed the last 12 hours trying to found out how but nothing is working and description are poor please could any body help? This is where you can get it:
pypotrace web site
This problem was so much of a pain that I ported potrace to python directly rather than using hooks and requiring local compile.
pip install potracer
https://github.com/tatarize/potrace
I implemented the same API as pypotrace so it should be fairly painless.
Since you are working in windows you need the following steps:
You may need the python distutils package - pip install -U distuilts should do the job.
You will also need Cython - the windows installers are here.
You need to install mingw and make sure it is working in
msys mode - run msys and you should get a command prompt in it type
gcc --version and make sure you get a sensible reply.
also make sure your python runs from within msys
Do the required downloads:
potrace source,
agg source site broken or the GitHub zip file here,
potrace source from here and unzip it.
The follow the instructions at the link you gave and tell us where they stop working.
I'm trying to install a Python Module by running a Windows installer (an EXE file).
The Problem is that the default python folder and the defualt Installation Library are set To disc D:\ and are grayed out (meaning I can't change it). It might be fine is some places, but in my computer, D is the DVD drive, meaning that no installation is possible.
Is there any way to change this or to overcome this?
It's not "default folder", and there's a reason there's "found in registry" next to the version. You need to re-register the Python installation if you've moved it, either by installing it again (without removing) in the same folder, or changing the directory saved in registry (HKCU\Software\Python\PythonCore\X.X\InstallPath, possibly on Wow3264Node) either manually or using registration script.
Because what you're installing (you don't say what it is) seems to be standard distutils-generated installer (as Cat Plus Plus points out in his comment) you don't have to install it by running installer. You can install it using easy_install program what allows you to choose which Python to use. See my answer to Can I install Python windows packages into virtualenvs? question.
EDIT
Now I see in your comment you're installing setuptools. This complicates things a little bit as this is the package which contains easy_install tool I mentioned above. You have chicken/egg problem here... There's solution for this, however. You can use ez_setup script to install setuptools without using exe installer.