Install Python34 Library

Install the latest official release. This is the best approach for most users. It will provide a stable version and pre-built packages are available for most platforms. Install the version of scikit-learn provided by your operating system or Python distribution. This is a quick option for those who have operating systems or Python distributions. Jul 27, 2021 If you installed Python from source, with an installer from python.org, or via Homebrew you should already have pip. If you’re on Linux and installed using your OS package manager, you may have to install pip separately, see Installing pip/setuptools/wheel with Linux Package Managers. Install the repo package (on RHEL you will need to enable optional channel first): yum install rhscl-rh-python34-.noarch.rpm # 4. Install the collection: yum install rh-python34 # 5. Start using software collections: scl enable rh-python34 bash Solution 5: Use the SCL repos.

Contents

  1. How to install wxPython
    1. GNU/Linux - Building from the source

Install Python

The stable release of wxPython requires Python version 2.7. Get it from the official download page.

Windows

Install Python Library Windows

Installation under windows is especially simple: Run the installer you can get from wxPython and follow the instructions.

Mac OS X

An installer is available on the wxPython site, for both PPC and Intel Macs.

If you wish to build it yourself, you should follow the instruction described here.

A french howto can be found here

If you receive a message about the package being 'damaged and can't be opened', then you need to change the security preference setting that is labeled Allow applications downloaded from: to Anywhere.

Install Python Library From Github

GNU/Linux - Redhat

You can find RPMs for Redhat (they are working just fine with Mandrake through), at the address wxPython

GNU/Linux - Debian

wxPython can be installed through apt-get by calling apt-get install python-wxgtk2.8 or apt-get install python-wxgtk2.6, depending on which version you want. You may have to call this with root permissions. The wxPython demo is in the wx-examples package. However, it is advised to install the demo separately, as described at Using wxPython Demo Code.

Code

Try this:

Please note that sometimes older versions of wx are installed by using this method See InstallingOnUbuntuOrDebian for how to get the latest versions with apt-get.

GNU/Linux - Raspbian on Raspberry Pi

wxPython 4.0.7.post2 can be installed and does run on Raspberry Pi's Debian variant, Raspbian. It works on Python 3.4 and up. For install instructions Build wxPython on Raspberry Pi.

GNU/Linux - Gentoo

wxPython can be installed through portage by calling emerge wxPython (notice the capital P). The correct command is actually emerge wxpython (without a capital p) as of 11/28/04.

GNU/Linux - Building from the source

You might also want to build wxPython from the source. You have to do this in three steps:

Installing wxGTK from source

wxGTK is the GTK version of wxWidgets. GTK (Gimp ToolKit) is a graphic library used by Gnome, so it is probably already installed on your Linux box. All you have to do is download the wxGTK source from the wxGTK ftp server. Or the wxWidgets website

  • Untar wxGTK by type the command:
  • Go into the directory:
  • Run the configure script:

You might get some errors here if GTK is not installed or if the include files for GTK are not installed (in a Mandrake distribution, gtk+-devel-1.2.8-6mdk.i586.rpm is the rpm that you want to install)

  • Run the make file:
    • You might get some errors here if yacc or lex are not installed. (in a Mandrake distribution, the right rpms are byacc-1.9-7mdk.i586.rpm and flex-2.5.4a-13mdk.i586.rpm)

You should now have a compiled version of wxGTK. We want to install it and link it into the system.

  • Become superuser:

Your root password is required here.

  • Install wxGTK:
  • Link the library:
  • Exit from superuser mode: Normally, wxGTK is installed but there might be a problem with wxPython:

it is possible that the library is not installed where wxPython is looking for it. ( In a mandrake 7.2 distribution, you want wxGTK to be installed in /usr/lib whereas it is automatically installed in /usr/local/lib) The solution is to create a symbolic link of the library where you want it to be:

  • Go in to the directory where you want the library to be installed:
  • Create a symbolic link to the library:

Installing wxPython from source

  • Download the source code of the last wxPython release:

wxPython website

  • Untar the tarball:
  • go into the directory:
  • Edit the setup.py to choose what you want to install. I suggest that you don't install OGL and GL_CANVAS. by selecting:
  • Build the python module:
  • Become root:

Your root password is required here.

  • Install the module:
  • Exit root mode:
  • Check if the module works:

wxPython is fully installed!

Please note that the most up to date information about installing the new wxPython4 wheels is usually located on the main wxPython website at: https://wxpython.org/pages/downloads/.

Make sure you have recent versions of pip and setuptools installed.

  • Installing wxPython4 (Phoenix) on Linux Since wxPython is not able to be built to the manylinux1 standard we're not able to put binaries on PyPI. Instead binary wheels are made available for a few popular linux distributions, and you can install them using pip once you locate the proper folder to tell pip to download from. Look around in https://extras.wxpython.org/wxPython4/extras/linux for a folder matching your distro and gtk preference. You can then install with a command like the following command. If you are not installing into a Python virtual environment then you will probably need to insert sudo at the beginning of the command:

  • Installing wxPython4 (Phoenix) on Windows and OSX Binary wheels for these platforms are available on PyPI so you can install with this simpler command if build are available for your target Python:

  • Verify installation
-->

Applies to: SQL Server 2017 (14.x) only

This article describes how to use standard Python tools to install new Python packages on an instance of SQL Server Machine Learning Services. In general, the process for installing new packages is similar to that in a standard Python environment. However, some additional steps are required if the server does not have an Internet connection.

For more information about package location and installation paths, see Get Python package information.

Prerequisites

  • You must have SQL Server Machine Learning Services installed with the Python language option.

Other considerations

  • Packages must be Python 3.5-compliant and run on Windows.

  • The Python package library is located in the Program Files folder of your SQL Server instance and, by default, installing in this folder requires administrator permissions. For more information, see Package library location.

  • Package installation is per instance. If you have multiple instances of Machine Learning Services, you must add the package to each one.

  • Database servers are frequently locked down. In many cases, Internet access is blocked entirely. For packages with a long list of dependencies, you will need to identify these dependencies in advance and be ready to install each one manually.

  • Before adding a package, consider whether the package is a good fit for the SQL Server environment.

    • We recommend that you use Python in-database for tasks that benefit from tight integration with the database engine, such as machine learning, rather than tasks that simply query the database.

    • If you add packages that put too much computational pressure on the server, performance will suffer.

    • On a hardened SQL Server environment, you might want to avoid the following:

      • Packages that require network access
      • Packages that require elevated file system access
      • Packages used for web development or other tasks that don't benefit by running inside SQL Server

Add a Python package on SQL Server

To install a new Python package that can be used in a script on SQL Server, you install the package in the instance of Machine Learning Services. If you have multiple instances of Machine Learning Services, you must add the package to each one.

The package installed in the following examples is CNTK, a framework for deep learning from Microsoft that supports customization, training, and sharing of different types of neural networks.

For offline install, download the Python package

If you are installing Python packages on a server with no Internet access, you must download the WHL file from a computer with Internet access and then copy the file to the server.

For example, on an Internet-connected computer you can download the file cntk-2.1-cp35-cp35m-win_amd64.whl from the site https://cntk.ai/PythonWheel/CPU-Only, and then copy the file to a local folder on the SQL Server computer.

Important

Make sure that you get the Windows version of the package. If the file ends in .gz, it's probably not the right version.

For more information about downloads of the CNTK framework for multiple platforms and for multiple versions of Python, see Setup CNTK on your machine.

Locate the Python library

Locate the default Python library location used by SQL Server. If you have installed multiple instances, locate the PYTHON_SERVICES folder for the instance where you want to add the package.

For example, if Machine Learning Services was installed using defaults, and machine learning was enabled on the default instance, the path is:

Install Pycharm

Tip

For future debugging and testing, you might want to set up a Python environment specific to the instance library.

Install the package using pip

Use the pip installer to install new packages. You can find pip.exe in the Scripts subfolder of the PYTHON_SERVICES folder. SQL Server Setup does not add the Scripts subfolder to the system path, so you must specify the full path, or you can add the Scripts folder to the PATH variable in Windows.

Note

If you're using Visual Studio 2017, or Visual Studio 2015 with the Python extensions, you can run pip install from the Python Environments window. Click Packages, and in the text box, provide the name or location of the package to install. You don't need to type pip install; it is filled in for you automatically.

  • If the computer has Internet access, provide the name of the package:

    You can also specify the URL of a specific package and version, for example:

  • If the computer does not have Internet access, specify the WHL file you downloaded earlier. For example:

You might be prompted to elevate permissions to complete the install.As the installation progresses, you can see status messages in the command prompt window.

Load the package or its functions as part of your script

When installation is complete, you can immediately begin using the package in Python scripts in SQL Server.

To use functions from the package in your script, insert the standard import <package_name> statement in the initial lines of the script:

See also

Install Python Library Linux

  • Python API for CNTK.