PyCharm how to include wxPython library path/Can I download wxPython? - python

I've tried so many times to find this pathing but to no avail(link: How do I import modules in pycharm?)
I think it's because I'm using a newer version of PyCharm, but here is my project Interpreter:
I don't see the + path anywhere in here, and I have downloaded a version of wxPython on my computer that I want to wire the path to. In the url link's first answer, he says to add a path, but I don't even see the path tab in my default settings.
I tried downloading wxPython using the project interpreter, but this is what I get:
And I searched for a while to find out that perhaps PyPi does not support wxPython(maybe I'm wrong on this, but: https://github.com/kliment/Printrun/issues/535 ,here it says to download the wxPython binary instead because the project interpreter does not support wxPython). I was able to successfully download numpy and matplotlib, so I was quite confused when I couldn't download wxpython.
So now I'm stuck, because I can't add a path to my wxPython(inside of wxMac folder), and I can't download wxPython directly. The only other way I can think of is manually copying and pasting the wxmac folder into my virtualenv folder's bin, but I'm afraid of not copy pasting the right thing into the right directory.
What is going on? Any help would be greatly appreciated!

You should just download the appropriate wxPython binary for your OS and install it that way instead of using PyCharm. I have had no problems installing wxPython on Windows, Linux or Mac doing it this way.
wxPython is currently not on PyPI. The beta version of wxPython, known as wxPython Phoenix, supports pip. The regular version of wxPython (classic) uses just binaries or you can build from source. Note that wxPython Phoenix doesn't have all the widgets that Classic does. It just has the core widgets plus a number of others. You can read more about Phoenix here:
http://wiki.wxpython.org/ProjectPhoenix
http://wxpython.org/Phoenix/docs/html/MigrationGuide.html

Related

Installing Qt5 and PyQt5 for Python 2.7

I am new to Stack Overflow and Python.
I am developing for Visual Effects, which means that I am (and will continue) using Python 2.7. I'm a bit lost and looking for clear instructions on how to install pyqt5. I know this seems pretty elementary, so I appreciate everyone's patience.
There is a lot of information on this subject like, you need QT5 or Scintilla? A lot of the instructions are fragmented and don't have all of the information. I was wondering if someone could point me in the right direction with clear and concise instructions.
For example:
Install Python 2.7
Install x
...
...
...
I'm willing to figure it out myself, but I feel the information I have has a lot of holes and could use some help/direction.
Thanks in advance.
Maybe this link can help. It is for installing PyQt5 on Python 3, but I think it will be the same process for Python 2.
Update:
Since you didn't say any specific OS, I will assume you're using Windows. For Windows, there is already Python distribution which is ready to use such as WinPython. This is what I've done on my machine:
Download appropriate WinPython version for your machine,
Download appropriate PyQt5 wheels version for your machine,
Install WinPython,
Extract the downloaded PyQt5 wheels,
Copy pyqt5-tools folder found inside where you extracted PyQt5 wheels
Paste it to Where_You_Installed_WinPython\Lib\site-packages.
You can start designing your GUI with double-clicking Qt Designer.exe. After you finished designing your GUI, you can convert the GUI file (with *.ui extension) to *.py with pyuic5 -x yourgui.ui -o yourgui.py command.
python and pyuic5 command on your command prompt can only be executed in your WinPython installation folder. inside your WinPython installation folder.

wxpython 3 on windows

How can I download wxPython 3 on windows?
I see this link but it has .egg extension, and not exe. Ive given up on pyQT because of the lack of advanced tutorials for PyQT4, and I really would like a good libaray i can build GUI's from in Python. Ive read that wxpython 3 is compatible with the wxpython 2 api.
I cant find any good online tutorials for installation. Im using Python 3.3.2, Any suggestions? Thanks!
wxPython does not yet officially support Python 3. However, if you unpack the .tar.gz in a directory and run c:\Python33\python.exe setup.py install or equivalent on your system, it should install just fine.
However, beware that some parts of the library may not work on Python 3 yet.
Note: Tested with wxPython_Phoenix-3.0.1.dev75711.tar.gz.
To install wxPython for py3k (Phoenix) on windows.
First install setuptools.
This creates easy_install.exe in your Python Scripts folder.
Then download Phoenix.
For example: wxPython_Phoenix-3.0.1.dev75783-py3.3-win32.egg
Put the downloaded egg file somewhere.
For example in C:\Python33\
Open the console, go to C:\Python33\Scripts
run:
C:\Python33\Scripts>easy_install.exe C:\Python33\wxPython_Phoenix-3.0.1.dev75783-py3.3-win32.egg
Phoenix will install

Python installing PyQt4 module to custom software

This is something I've been researching for past few hours but so far nothing come out of it.
Basically I have software that use Python 2.5.5. It does not have QT module in it.
So in my attempt to install it I did this.
Downloaded executable QT PyQt4-4.10.2-gpl-Py2.7-Qt4.8.4-x64. Run Exe. It installed in python 2.7 site-packages.
Then I moved that folder to my software Python 2.5.5. Now there was no site-packages folder so I created it.
Next step was to go over this instruction http://docs.python.org/2/install/ and use Alternate installation: Windows (the prefix scheme) with my file location from inside program. But I cant run python setup.py install --prefix="\Temp\Python" (with my location of python) because python is not defined and so on. I'm pretty sure thats the wrong way to do it. So how or where do I look for information as to how to do it? The software itself dont have any documentation.
Thanks, bye.
That binary version of PyQt4 only supports python2.7, so no matter what you do, you won't get it to run with python2.5.
The last PyQt4 version with a binary for python2.5 is PyQt4.9.4, so if you want to have any chance of making this work you should try with this version.
Note however that the software you distribute like this will also only run on python2.5.

Use all-in-one pygtk installer Windows 7 doesn't work?

I have python 2.6 installed on my Windows 7 OS. I can run the python command from the command line and I enter into a python interpreter. Now I want to install the pygtk modules. In the past I have installed GTK+, PyGTK, PyCairo and PyGObject separately and got everything to work. I would like to use the all-in-one installer provided on the pygtk website. I downloaded the version from python 2.6 and the installation completed successfully.
However import gtk and import pygtk still give me the ImportError: No module named .... Does anyone know a trick to get this "all-in-one" installer to work?
Please see my answer to the post here. Bottom line is I couldn't get the all-in-one installer to work for windows 7, but I DID get pygtk running by following the instructions given in that post.
I am a dummy for installing the NOT all-in-one-package, (Perhaps confusingly) the one listed top on the pygtk download page (pygtk-2.24.0.win32-py2.7.exe) to which the link on the description points is the wrong installer (i.e. NOT the all in one installer).
When I corrected my mistake and used the pygtk-all-in-one-2.24.2.win32-py2.7.msi installer, everything worked just fine! Perhaps this is what happened to jeffery_the_wind too...
The all in one installer works. Try the following link:
pygtk-all-in-one-2.24.2.win32-py2.6.msi
On the PyGTK downloads page, clicking on the all-in-one installer link directs you to listing of PyGTK installation binaries. Perhaps you downloaded and installed the 'pygtk-2.24.0.win32-py2.6.msi' binary which is at the top of the listing (and probably shouldn't be here) but doesn't work.
I don't know if this can help, but it may be the solution as it once was for me years ago under XP :
The all-in-one installer installs PYgtk, PYcairo, ... and allsort PYstuff, but DOES NOT install GTK+ itself.
I had to download the GTK library separately, unzip it in some folder (say "C:\GTK"), and ADD that folder in the system path, and there it was fixed !
(there is an all-in-one bundle for GTK : http://www.gtk.org/download/win32.php)
Hope this was helpful.

How to Setup PyDev/Eclipse in Lion?

I'm a little bit confused about how to approach this. I had never used OS X before and I don't know how to configure it. After downloading PyDev with Eclipse I go to "Preferences > PyDev > Interpeter - Python > Auto Config" as I would normally do. I select the packages:
image
But then I keep getting this message:
image
I've read somewhere that I should download Xcode to get GCC (which is over a GB), then download and build python with it,... and then start working. But doesn't sound like it makes a lot of sense since Lion already comes with python 2.7.x which is what I'll be using.
Any idea on how could I properly set this up? Thank you all in advance
Well, it may have Python installed, but PyDev wants to be able to view the source of the python files to enable autocompletion.
Install Xcode, yeah. Xcode ships with the developer version of Python, which includes all those .py files. I'm fairly sure that you don't actually need to build Python from scratch (I never had to) - just installing Xcode itself should be enough.
Ideally, install python from http://python.org (there's a mac version download there) and use that version (and don't fiddle much with the version that's installed in mac itself as it's not suitable for development as it doesn't come up with sources and other programs may rely on it, so, if something bad happens and you break it, it won't affect your system).

Categories