How to install wxPython for Python 3.3? - windows-7

I need wxPython for a project I'm currently writing. It's a basic text editor- it'll eventually have markdown and bbcode editing supported (with error checking), but right now I want to get the program working. The guide I'm using uses wxPython, but it's official support is only up to 2.5. I'm using Python 3.3, and I grabbed one of the development builds.
I just don't know how to install it, but I found this comment, but I'm not sure what it's telling me to do. Is it telling me to create a folder in one of python's subfolders, then use the bit of code in every wx program I make? Or is it telling me something else?
Edit: I found the site-packages folder and made the folder, then pasted the appropriate folder in the folder I made, but it threw the error :
ImportError: No module named 'wxversion'
Using Ninja IDE 2.2, if it helps at all.
Edit 2: So I wx instead of wxversion, and it seemed to work, but now Ninja IDE pulls up core.py and tells me
ImportError: DLL load failed: %1 is not a valid Win32 application.
Does anyone know what this means, and how I can fix it?

If you don't have another version of wxPython installed then you don't have any need to use wxversion. Just put Phoenix's wx package folder directly in site-packages and use it normally.

Related

How to create distribution of Python GTK3 app?

I made an application using GTK3 on Windows (Mingw_x64 installation of GTK) and I cannot really figure out how to make a distribution out of this. According to official documentation of PyGObject, it is possible in some way.
I already tried to make a package using setuptools, but PyGObject documentation is not saying much about this process and I was not able to configure setup correctly to make it work. PyGObject has a lot of dependecies and weird imports, that I do not know how to include.
I also tried Pyinstaller, which claims it has GTK support, and it really can pack it into executable, however it is not working. I tried these two options:
make only one file (.exe), but in this situations, it throws an error, that some file is not found (libpixbufloader-ani.dll)
create a directory with all needed files (libpixbufloader-ani.dll and other libs are included this time), but when running exe, another exeption occurs, this time Struct and 2 other libraries are missing (strangely, there is a folder that contains Struct)
Becouse of the missing files, I tried adding as many paths containing needed libraries as possible to Pyinstaller, but without success.
Does anyone have any experience with packaging GTK appliciations in Python? There is definitely a way to do this, but I am not very experienced with packaging. If needed, I can provide more information.
This is an issue that has been brought up on PyInstaller's GitHub page, as others (including myself) have experienced the same issue that you've mentioned.
The last time I tried the dev version of PyInstaller, the issue still wasn't fixed, but I managed to get a working executable by using PyInstaller to find the dependencies that my Python3/GTK3 app needed, and then I used cx_Freeze to generate the final executable.

How do I install gtk-fortran on windows 8?

I want to build a GUI for some fortran code I have. GTK-Fortran seemed like a simple option, but I'm having trouble getting everything installed in the correct place.
I am using Windows 8. I have gfortran (version 4.8.1), Cmake, and GTK+ 3 installed. As far as I can tell, the last thing I need to do is include GTK-Fortran, which I download from https://github.com/jerryd/gtk-fortran (the link to download the .zip file is on the right side of the page), but all of the instructions on what to do with it are incredibly vague to me. The INSTALL instructions seem to want me to make a new directory, C:\build, and then do something with cmake, but I'm not sure what that something is or how to do it.
I have GTK+ 3 in C:\GTK, and its bin is included in the path. I would like to just put the GTK-Fortran files within the GTK folder, but I don't think that will actually give me access to the GTK-Fortran files.
Could someone give me very clear instructions on what to do with the files for GTK-Fortran so that I can call them from my own fortran code?
The simplest way for using gtk-fortran under Windows is to install MSYS2/MINGW64, following the installation steps described in the wiki of the project:
https://github.com/vmagnin/gtk-fortran/wiki#windows

Build or Compile Webkit on Windows7 64bit

I'm trying to just build webkit on windows. As usual I started with webkit site and trying to get developer tools setup. I'm struck basically at the cygwin Installation itself.
The cygwin-downloader gets all the packages and runs the setup normally.
As per the installation instructions, I selected the Install from Local Directory Option (cygwin install and source package directories are different).
There was some initial turbulance in finding the packages, somehow i could let it find the packages. The screen looks like this now.
I selected the packages (all) and then proceeded with next. It just ran very fast and exited saying nothing needs to be installed. It looked like this.
After I ran the cygwin shorcut from the desktop its shouting something is missing.
I don't understand what am I missing here. Also at some link it says we need a port to build webkit. If thats the case, how does anyone port webkit to their applications without building the webkit alone?
I know this is not a programming question. but this will help most of the people who are taking baby steps in understanding and build WebKit. Thanks!
According to this, it's seems a cygwin-downloader's bug.
However, there is a workaround...
Just copy {cygwin-downloader}\setup.ini file to a {cygwin-downloader}\x86\ directory. Then reopen setup.exe. It will show you a package list without turbulence. You don't need to click all from the package list. Just click Next.

Getting firebird to work under OSX with Delphi Firemonkey app

Does anyone know of a guide to getting Firebird working under OSX for Delphi apps?
I am using the InterBase Express components but when I start my app I get the error saying that libgds.dylib is missing. I have renamed the libfbclient.dylib to libgds.dylib. I have even made a copy in the original path and done a symbolic link to the /usr/local/lib folder (as is the case with libfbclient.dylib).
Here is what I have tried...
I have added '/usr/local/lib' to the paths in the target profile.
I have tried copying the file into the package
I have copied the file to my windows machine and then distribute it using the project deployment options.
Nothing appears to work. I'm not trying to create a redistributable package at this point. I just want to get the app working for debug.
One further bit of information. I installed the standard Firebird package rather than the Lipo package. I confess to not really understanding the difference. I am going to try installing the Lipo package now to see if that makes a difference.
Thanks in advance,
Martin
Solution found. The problem was the package that I installed.
After installing the Lipo package it appeared to find the dylib and continue.
Im not there yet as now I am getting a Permission Denied error trying to create the database in the Documents folder. I guess I will post another question if I cant get to the bottom of this one.

Totally Lost on "Installing" OpenCV / ctypes-opencv for Python 3

edit: The real solution to this is now that OpenCV supports python 3. I'm leaving the details below for anyone who happens to be stuck with an old setup.
I'm trying to get OpenCV working with Python 3. A friend showed me ctypes-opencv that appears to work with Python 3. The problem is I totally can not figure out how to "install" or get any code working. I've followed all instructions I could find from a few people mentioning installs on google and none of those seemed to work or I couldn't even get through the basics that they mentioned.
I am just hacking around with the version of IDLE that came with Python 3. No IDE.
Start with OpenCV:
The only windows installer for OpenCV 2.1 is a visual studio installer. I assume that means that it installs files that make it easier to use in Visual Studio. However, does it also mean that I can't use that installer with Python 3? I tried the vs installer together with ctypes-opencv as below, and I got errors that the dlls were not in my path (but my path variable did include the OpenCV bin folder with dlls). Is this the wrong direction?
The apparent alternative is to build OpenCV myself. I tried following the directions here and all I get is "project files may be invalid" from the CMake gui application when pressing the "Configure" button. Same when following these hints from Stack Overflow. I'm suspicious that this is also the wrong direction since I am not currently using any of the tools that are listed in the CMake configure. Is this also the wrong direction?
Next ctypes-opencv:
I installed this and the installer recognizes Python3.1 and puts itself into the site-packages folder. If I try to run demos, it tells me the dlls are not in the path although they are, as mentioned above.
Summary:
I think I generally understand each piece here (code, compile, dll, imports, ...) but I do not know how all the pieces fit together and where I am going wrong. Can someone please tell me what steps or understanding I am missing here?
I get the feeling that I need to be reading a book or two to fill in the holes in my understanding of how all these pieces fit together. I wouldn't even know what area of books to get though so any suggestions there would be appreciated as well.
Python's ctypes is a wrapper around the opencv dll files, as long as you can point to the compiled libraries it doesn't matter what the source code is set up to be edited in. For windows I would simply run the installer, then try to load the dll with ctypes. If you can get that far, any other errors can be fixed by looking at the ctypes wrapper file and editing the load section to look like your test file.
Christoph Gohlke maintains Windows binaries for many Python packages, including the production version of OpenCV 3.0 with Python 3.x bindings, released 4 June 2015:
http://www.lfd.uci.edu/~gohlke/pythonlibs/#opencv
To install, just download the 64-bit or 32-bit .whl file appropriate for your system, then run pip install [filename]. Then the instruction import cv2 should work in your Python 3.x interpreter.
Yakiimo san, OpenCV 2.1 DLL can be loaded with ctypes. I have tested it.
p.s. I have set the C;\OpenCV2.1\bin in Env Path.

Resources