Results 1 to 3 of 3

Thread: How to install wxPython on OpenSuSE 42.3 and 15

  1. #1

    Default How to install wxPython on OpenSuSE 42.3 and 15

    I am using OpenSuSE 15 to learn Python and wxPython. I see that both Python 2.7 and 3.0 are installed in both OpenSuSE versions. I am unable to find documentation on the Internet on how to install wxPython on OpenSuse. The closest thing is the documentation on the wxPython site but it's geared towards Ubuntu, Windows and OS X. Can someone that know show to perform the installation on OpenSuSE (the makers choice) create detailed instructions? Here are some of my questions:

    Are there articles already available that I'm just not finding in Google searches?

    What version of Python do I need to use in OpenSuSE 42.3 and 15? It looks like the current version of wxPython that's in the repository will work on Python 2.7 but not 3.x. Is there a version of wxPython that works in Python 3.x? I don't really want to learn Python 2.x if the future is 3.x.

    Is python 2.x run with the python command and python 3.x run with the python3 command? Is pip the pip for Python 2.x and pip3 the pip for Python 3.x? With all of the documentation out on the Internet these issues aren't clear to me.

    I used the repository to install wxPython 3.0.2 but the installed version of wxGTK is 3.1.1. If I open Python 2.7 in a terminal and import wx, a warning is displayed about a version mismatch between wxPython and wxGTK. How can I fix that? Can the package maintainers keep the versions in sync?

    What development software/IDE should I use until I know enough about Python to make a wise decision on purchasing an IDE package?

    What is the recommended GUI designer for wxPython on OpenSuSE 42.3 and 15?

    I have other questions and will have many more but these questions should provide an idea of the newbie type questions that would be nice to have answered in an article.

    Hope someone can help.

  2. #2
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    13,295
    Blog Entries
    2

    Default Re: How to install wxPython on OpenSuSE 42.3 and 15

    That's quite a list of questions.
    Let's see if some of them can be knocked out (with the understanding that others may have contrary opinions for some of my answers)
    Keep in mind that documentation for Developers can be sparse compared to for Users, assuming that Developers are fluent in knowing how to read MAN pages, Help files, and where to find documentation in your distro. When you don't know where documentation exists, I'd suggest using the "locate" utility to perform quick searches of text and character strings on file and path names. The "locate" utility is in the package "mlocate" so you can install with the following command
    Code:
    zypper in mlocate
    When you install locate, its database of your file systems will be updated daily, but you don't want to wait 24 hrs before first use, so run the following
    Code:
    updatedb
    And then you can search for something like the following if you were looking for python binaries on your system
    Code:
    locate /bin/python
    Generally speaking, you should also use the web search tool to identify specific packages you might want, so for instance the following search returns results for python2, python3, and additional documentation beyond what is in the basic packages

    https://software.opensuse.org/search...%93&q=wxpython


    Quote Originally Posted by LinxPatrick View Post
    I am using OpenSuSE 15 to learn Python and wxPython. I see that both Python 2.7 and 3.0 are installed in both OpenSuSE versions. I am unable to find documentation on the Internet on how to install wxPython on OpenSuse. The closest thing is the documentation on the wxPython site but it's geared towards Ubuntu, Windows and OS X. Can someone that know show to perform the installation on OpenSuSE (the makers choice) create detailed instructions? Here are some of my questions:

    Are there articles already available that I'm just not finding in Google searches?

    What version of Python do I need to use in OpenSuSE 42.3 and 15? It looks like the current version of wxPython that's in the repository will work on Python 2.7 but not 3.x. Is there a version of wxPython that works in Python 3.x? I don't really want to learn Python 2.x if the future is 3.x.

    Is python 2.x run with the python command and python 3.x run with the python3 command? Is pip the pip for Python 2.x and pip3 the pip for Python 3.x? With all of the documentation out on the Internet these issues aren't clear to me.
    Yes regarding the python commands. Whenever there is a question in your mind whether a command will work, just test it with the "--help" option. For example
    Code:
    python --help
    Quote Originally Posted by LinxPatrick View Post
    I used the repository to install wxPython 3.0.2 but the installed version of wxGTK is 3.1.1. If I open Python 2.7 in a terminal and import wx, a warning is displayed about a version mismatch between wxPython and wxGTK. How can I fix that? Can the package maintainers keep the versions in sync?
    Ordinarily python 2 and python 3 packages are different and cannot be used for the other, so you should install the wxPython packages appropriate for your python version and not try to use packages for another python version.
    Quote Originally Posted by LinxPatrick View Post
    What development software/IDE should I use until I know enough about Python to make a wise decision on purchasing an IDE package?


    What is the recommended GUI designer for wxPython on OpenSuSE 42.3 and 15?
    Especially for python, there are a great many choices and many are good.
    I'd recommend in the beginning you try them all unless you're working or taking classes in a group in which all participants should use the same tools.
    If you decide to learn from some tutorial, the tutorial will generally recommend tools to use.
    There are free tools, and there are commercial (cost) choices. The ones that cost usually provide some way of giving you a trial to "try before you buy."
    And, it might make a difference if you have aspirations for working on certain projects. The people working on that project will generally already be using their set of tools.
    Especially for beginners, code organization can be a real problem if you're writing something that is more than just a few statements.
    An IDE will usually automatically set up and enforce some kind of structure and organization, often with the purpose of code re-usability.
    In the beginning, shy away from IDEs that are only enhanced text editors (When you try something new, you're guided to set up a new project and you see nothing more than a blinking cursor).
    Quote Originally Posted by LinxPatrick View Post
    I have other questions and will have many more but these questions should provide an idea of the newbie type questions that would be nice to have answered in an article.

    Hope someone can help.
    Good Luck and hope your efforts bring success.

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  3. #3

    Default Re: How to install wxPython on OpenSuSE 42.3 and 15

    On 2018-06-03, LinxPatrick <LinxPatrick@no-mx.forums.microfocus.com> wrote:
    > I am using OpenSuSE 15 to learn Python and wxPython. I see that both
    > Python 2.7 and 3.0 are installed in both OpenSuSE versions. I am unable
    > to find documentation on the Internet on how to install wxPython on
    > OpenSuse.


    https://software.opensuse.org/package/python2-wxPython
    https://software.opensuse.org/package/python3-wxPython

    > What version of Python do I need to use in OpenSuSE 42.3 and 15?


    Any version >=2.7.1 or 3.4.1 will do, including the ones openSUSE includes as default.

    > It looks like the current version of wxPython that's in the repository will
    > work on Python 2.7 but not 3.x. Is there a version of wxPython that
    > works in Python 3.x?


    https://software.opensuse.org/package/python3-wxPython

    > I don't really want to learn Python 2.x if the future is 3.x.


    I'm not sure how soon.

    > Is python 2.x run with the python command and python 3.x run with the
    > python3 command?


    By default on openSUSE, yes.

    > Is pip the pip for Python 2.x and pip3 the pip for
    > Python 3.x?


    Yes.

    > With all of the documentation out on the Internet these
    > issues aren't clear to me.


    Well hopefully we can clarify things here.

    > I used the repository to install wxPython 3.0.2 but the installed
    > version of wxGTK is 3.1.1. If I open Python 2.7 in a terminal and import
    > wx, a warning is displayed about a version mismatch between wxPython and
    > wxGTK. How can I fix that? Can the package maintainers keep the versions
    > in sync?


    Hang on, I thought you were looking to learn Python 3?

    > What development software/IDE should I use until I know enough about
    > Python to make a wise decision on purchasing an IDE package?


    On GNOME, use gedit, and on KDE use kate. If you're a beginner, using a IDE is a bad way to learn programming because
    IDEs hide things. If you insist on an IDE, try geany before moving on to bloated IDEs (e.g. Wing, Eclipse, NetBeans
    etc...).

    > What is the recommended GUI designer for wxPython on OpenSuSE 42.3 and 15?


    Sorry, no idea. wxGlade maybe?

    > I have other questions and will have many more but these questions
    > should provide an idea of the newbie type questions that would be nice
    > to have answered in an article.


    5 recommendations.

    1. Use openSUSE default Python 3.
    2. Scrap wx and use qt (or at least give me a *good* justification for sticking to wx).
    3. Don't use an IDE or GUI designer (at least to begin with).
    4. Read https://learnpythonthehardway.org/
    5. Don't worry too much about versioning and setup, and just code: code is more important.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •