python pygtk windows 7 64 bit - windows

I have been working with pygtk on linux for some time.I just want to make my app more distributable. Now I have used pygtk for 32 bit, but now I'd like to use pygtk for 64bit using pygtk 64bit. I have downloaded the all in one installer. I have changed my path as gtk would want and run the "pkg-config --cflags gtk+-2.0" command then ran the gtk-demo command and it did give me a demo and that works perfectly! Just I am missing someting because there in still no module named 'gtk' in my python gtk 64 bit.
I want to make the 64 bit version of gtk work on windows and when I get a fix I want to post on Youtube on how to make it work for others.
Thank you, I hope someone can help cause the documentation is lacking on this part.

Ok for those that are searching for a GUI Python lib to be used in Windows 64 bit here it is!
1) Install from python.org the python 64bit, If you already have python installed on your system, you wont need to worry about this.
http://www.python.org/ftp/python/2.7.3/python-2.7.3.amd64.msi
2)Add to your PATH in the advanced settings/environment variables
;C:\python27
3)Then download the all in one installer from GTK+
http://ftp.gnome.org/pub/gnome/binaries/win64/gtk+/2.22/gtk+-bundle_2.22.1-20101229_win64.zip
4)create a folder that is in c:\opt\gtk # it doesn't really matter where you'll just have to add it to PATH.
unzip the folder and copy all the files to the the file created above.
then, set your PATH to the file created E.G ;C:\opt\gtk\bin
You can test it now in cmd by typing:
"gtk-demo"
5)Now you still have to get the libraries gtk,PyCairo,goobject
http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygtk
py2cairo-1.10.0.win-amd64-py2.7.‌exe
pygobject-2.28.6.win-amd64-py2.7.‌exe
pygtk-2.22.0.win-amd64-py2.7.‌exe
I hope it helps. I saw a file "py2cairo-1.10.0.win-amd64-py2.7.‌exe"
I am not certain if this is needed I am currently testing my applications.
Now I just need to find gtksourceview2/3 for win7 64bit.
Good Luck! ;)

Related

How to install GnuPlot on windows?

A Unix (mac/Linux) user who has been forced to work on a windows machine here :)
I have scripted loads of work in GnuPlot and don't want to switch to other programs at this moment. I would appreciate it if you could help me know how to install GnuPlot On windows (more specifically windows 10). questions:
I know there are two options according to this page, Cygwin and MinGW. which one is better?
I have MinGW installed and I know I need to install one of the options from this page but I don't know which one(s)! and how.
I have searched the internet but it seems most of the search results are for compiling. I don't want to go through compiling and all the hassle.
I tried installing the binary from this link, and when I try to run the program this is the error I get:
Unable to execute file:
C:\Program Files\gnuplot\bin\wgnuplot.exe
CreatProcess failed; Code267.
The directory name is invalid.
I would appreciate it if you could give me a very simple stepwise installation (1 2 3 ...), preferably with visuals, and instructions.
P.S. A nice way to install Free, Libre, and Open Source Software (FLOSS) on Windows and keep them updated, is to use package managers like Chocolatey. There are GnuPlot chocolatey packages here. Just install choco as instructed here. Then use choco install Gnuplot to have the software installed.
You don't have to install MinGW or Cygwin. Actually packages compiled in MinGW are compatible with Windows. Just download the binary of gnuplot from Their repo and you are good to go.
Additional points:
When installing, check which terminals you want to set up; also
check if you want the installer to add the PATH variable to your
system. Also, create a desktop shortcut.
After installation, you should see the desktop shortcut. Clicking on it should open a terminal-based gnuplot (which hopefully you are familiar with).
Please note that I have used the x11 terminal (you can get this working by installing xming). There are other options such as windows and qt terminals, but I am not an expert on using these.
You should have Administrator rights on this machine.
Right click on MinGW, Run as Administrator, install - should be OK.
Good luck!
BR, Alex
You can try
$~ scoop install gnuplot
Installing 'Gnuplot' (5.4.5) [64bit] from main bucket
gp545-win64-mingw.7z (37.7 MB) [=======================================] 100%
Checking hash of gp545-win64-mingw.7z ... ok.
Extracting gp545-win64-mingw.7z ... done.
Linking ~\scoop\apps\Gnuplot\current => ~\scoop\apps\Gnuplot\5.4.5
Creating shim for 'gnuplot'.
Creating shortcut for GNUPlot (wgnuplot.exe)
'Gnuplot' (5.4.5) was installed successfully!

Having difficulty running pygame 2.7

Every time I try to run Pygame 2.7 version I get this prompt:
Windows cant open this file:
File name: pygame-1.9.2b1-cp27-cp27m-win_amd 64.whl
To open this file Windows needs to know what program you want to use to open it.
Windows can go online to look it up automatically, or you can manually select from a list of programs that are installed on your computer.
What do you want to do?
Use the Web service to find the correct program
Select a program from a list of installed programs
How can this be solved?
I've tried many Youtube videos.
That .whl file that you mention needs to be installed with a command-line tool called pip that comes with python. Assuming you are starting from scratch, here is what you need to do to install python and pygame. Also, as a minor sidenote, you are actually installing pygame 1.9.2 on python 2.7. Assuming you are interested in that particular version of python and pygame, here are the steps you need to follow.
To install python 2.7, you need to first go to the Python Software Foundation's website here. Go to the download section by clicking on the latest link for python 2.7.12. Scroll down and download either the x86 or x86-64 MSI installer (depending if you are on a 32bit or 64bit platform respectively).
Run the MSI installer. Most of the default options should be fine, nothing too tricky here.
After you run the installer, you need to add python to the PATH environment variable so that windows actually knows where python is on your computer. To do this, you need to find the Advanced System Settings section in your control panel (how to exactly get there varies depending on what Windows version you are on).
Once you are there, click the Environmental Variables... button. Under System Variables, we need to edit the value of the Path variable to include C:\Python27\ at the end of it. If all of the path variable stuff is on one line, you need to add a semicolon to separate it from the other paths in the list.
Congrats, now python 2.7 should be installed at this point! To test it out, open up the command prompt and type python. It should open up the interpreter in the command line and should be working.
Assuming it is working, exit out of the python interpreter. In the command prompt, type python -m pip install pygame. This should automatically install pygame for you. If you really want to use your wheel file, cd to the directory where it is installed and type python -m pip install pygame-1.9.2b1-cp27-cp27m-win_amd 64.whl.
Once that is done, you should have both python and pygame installed! Test it out in your IDE of choice (I personally use Geany) and start writing some code! Let me know if these instructions are clear enough.

Where is the source code for gcc-g++ stored on windows when installing through Cygwin?

I installed gcc-g++ through Cygwin on Windows 10. If you've ever used Cygwin on Windows, just before installing, it provides a huge list of different applications that can be used with it. Most of them, in addition to checking their install box, you can also check the source code box. I assumed this meant that it stores the source code of the application so that we can review it in order to understand how it's working.
I checked the box for gcc-g++, and I checked their source code box. However, when looking through the Cygwin installation folder, I can't seem to find where the source code is for the gcc-g++ application.
I was hoping that someone out there knew what folder their source code is stored in when installing through Cygwin to a Windows machine.
Thank you.
all cygwin source packages should be installing under /usr/src.

Can't build with mozilla-apk-cli without zip/unzip

I'm trying to build a packaged open web app with mozilla-apk-cli. But when I try it tells me I need to install unzip and zip from Info-zip. But the Info-zip site is beyond dated and the .msi I ran from there doesn't appear to have done anything.
I'm on Windows 8.1 64bit.
How am I expected to do this?
Until #Ozten fixes this, you might want to just get some binaries somewhere else, like gnuwin32 (zip, unzip) and put then somewhere in your PATH.
I'm the author of mozilla-apk-cli. I don't develop on Windows, so I need your help!
1) I'll do some digging, I assumed (wrongly) that Info-zip would install on Windows 8.1 64-bit
2) What is the preferred tool for zip/unzip from the command line on Windows 8.1? Can you point me at it's documentation?
Thanks for your help in improving mozilla-apk-cli.
Also: I've filed https://github.com/mozilla/apk-cli/issues/3
Update: I've documented how to install Info-ZIP. Thanks to Myk and nmaier.
I've tested this fix on Windows 8.1 and was able to build an APK.

Creation of Windows executable file (*.exe) with PyDev-Eclipse and CDT-Eclipse --- How?

Is it possible to create Windows executable files for Python and C/C++ code within the Eclipse workbench? If yes, then how can this be done?
This is how I create .exe files from eclipse, in windows. Is not within the eclipse workbench but it might help you. To avoid problems, I would recommend to download everything for 32 bit even if you use 64 bit computer.
Install python 2.6
Install Eclipse
Install py2exe
In eclipse go to Help > Install new software and install pydev plugin from http://pydev.org/updates/
In windows preferences point the python interpreter to the location of your python.exe in your computer (C:/Python26)
you might need to add py2exe to the libraries
create a python module called setup.py with a code similar to this one:
from distutils.core import setup
import py2exe
setup(windows=['H:/yourworkspace/YourPythonProject/src/yourprogram.py'])
open windows console and type
python H:/yourworkspace/YourPythonProject/src/setup.py py2exe
this will create a .exe located in C:/Python26/dist folder. It should work if you double click it but you cannot take it to a computer without python or any of the libraries that you´ve used. To do that, you can use Inno Setup.
It's very easy to use, basically it will ask for the location of the .exe, the dlls and folders that you want to add (I don't know about this so I add most of the things inside my C:/Python26/dist and it works). Inno setup will create an script and generate a .exe that you can install in any computer. You might need to edit the [Icons] part of the script, I had problems with that before to add an icon to the application.
That should hopefully work,
good luck.
Not sure I understand what you're asking as you're mixing Python/C++ in your question...
If you want to embed Python in some library, Google for 'embed python in c++'
If you just want to package Python to run Python code with extension modules, search for py2exe or cx-Freeze (personally, I like cx-Freeze better).
I don't think any of this is PyDev/Eclipse dependent (this should be IDE agnostic).
In addition to Fabio's answer:
In terms of C/C++, if you compile it on windows, eclipse does create yourprog.exe file automaticaly in order to be executed (in case if you have your main function written in C/C++). Look for your executable in bin folder of your project.
In terms of compiler: I use Cygwin. It simulates Linux environment. It contains (not by default though) g++ compiler, which, because of cygwin, compiles it in binary that can be launched in Windows (i.e. .exe file). I am not sure exactly about whether Linux binary is then converted to Windows binary or it is directly compiled for windows, but I know that this .exe file alone works if you run it.
Let me know if you need help installing Cygwin.

Resources