python_install
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
python_install [2017/12/30 16:52] – g00r00 | python_install [2023/01/08 12:24] (current) – g00r00 | ||
---|---|---|---|
Line 3: | Line 3: | ||
===== Installation and Requirements ===== | ===== Installation and Requirements ===== | ||
- | Mystic requires that Python 2.7 is installed on your system | + | Mystic BBS has an embedded Python scripting engine called Mystic Python. |
- | + | ||
- | Most Linux desktop distributions and Apple' | + | |
- | **Note:** If you are using the 32-bit version of Mystic | + | **NOTE: The "bit level" of Python must match the "bit level" of Mystic and the operating system. |
- | ==== Library Validation ==== | + | In Windows, Python needs to be installed by downloading it from the Website: |
- | When initializing Python, Mystic will be attempting to locate the following | + | In Linux, most come with either Python 2.7 or 3.x pre-installed. |
+ | |||
+ | **NOTE: With Linux, it may not be possible to mix and match versions of Python with Mystic. | ||
+ | |||
+ | ==== Library Validation / Installation ==== | ||
+ | |||
+ | When initializing Python, Mystic will be attempting to locate the following | ||
+ | |||
+ | Python 2.x: | ||
Windows: python27.dll | Windows: python27.dll | ||
Line 17: | Line 23: | ||
MacOS: libpython2.7.dylib | MacOS: libpython2.7.dylib | ||
- | In Windows, you should probably know if Python | + | Python |
- | In Linux environments, | + | Windows: python3xx.dll (Where xx is the minor version. |
+ | Linux: libpython3.xx.so.1.0 (Where XX is the minor version. | ||
+ | MacOS: libpython3.xx.dylib (Where XX is the minor version) | ||
+ | |||
+ | Mystic will search in known locations for Python libraries as listed below in order of search: | ||
- | ldconfig | + | Windows: |
+ | 32-bit: C: | ||
+ | 64-bit: C: | ||
| | ||
- | If the above command does not find anything but " | + | Linux: |
+ | Intel 32-bit: /lib/i386-linux-gnu, /lib, /usr/lib, / | ||
+ | Intel 64-bit: / | ||
+ | ARM: /lib, /usr/lib, / | ||
+ | |||
+ | In the event that Mystic cannot find the Python libraries, it may be required to override Mystic' | ||
+ | |||
+ | In Linux you can check to see where you may have Python installed | ||
ldconfig -p | grep libpython | ldconfig -p | grep libpython | ||
- | The result will tell you where Python 2.7 is installed. | ||
- | ==== Environment Variables ==== | ||
- | |||
- | In addition to the basic Python installation, | ||
- | |||
- | One common error reported when the environment variables need adjusted or set is the message " | ||
- | |||
- | **PYTHONHOME** and **PYTHONPATH** are two environment variables which need to be set. Depending on your operating system, Python may already be installed and working without making any changes. | ||
- | |||
- | SET PYTHONHOME=C: | ||
- | SET PYTHONPATH=C: | ||
- | SET PATH=%PYTHONHOME%; | ||
- | For more information on how to set environment variables, you'll need to research the specific operating system that you are using and the Python | + | ==== Missing |
- | | + | For Windows, simply go to the Python |
- | + | ||
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | + | ||
- | When PYTHONHOME is set to a single directory, its value replaces both | + | |
- | | + | |
- | | + | |
- | + | ||
- | | + | |
- | + | ||
- | | + | |
- | as the shell’s PATH: one or more directory pathnames separated by | + | |
- | | + | |
- | | + | |
- | + | ||
- | In addition to normal directories, | + | |
- | refer to zipfiles containing pure Python | + | |
- | | + | |
- | + | ||
- | The default search path is installation dependent, but generally begins | + | |
- | with prefix/ | + | |
- | | + | |
- | + | ||
- | An additional directory will be inserted in the search path in front of | + | |
- | | + | |
- | can be manipulated from within a Python | + | |
- | ==== Troubleshooting ==== | + | For Linux you can try to install by package manager, although it is VERY unlikely you have a Linux OS without a Python version installed. |
- | === Windows === | + | The following steps can be used to reinstall Python 2.7 by compiling it, if the package is not available or if the package installed does not work. This was tested on a fresh Ubuntu 18.04 LTS: |
- | The most common Windows issue is that the wrong version of Python is installed. | + | **INSTALL PREREQUISITES: |
+ | * sudo apt-get update | ||
+ | * sudo apt-get install build-essential checkinstall | ||
+ | * sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev | ||
- | === Unix === | + | **COMPILE PYTHON:** |
+ | * cd /usr/src | ||
+ | * sudo wget https:// | ||
+ | * sudo tar xzf Python-2.7.15.tgz | ||
+ | * cd / | ||
+ | * sudo ./configure -enable-optimizations -enable-unicode=ucs4 -enable-shared | ||
+ | * sudo make install | ||
- | The most common issue in Unix based platforms is that a link is not created to the Python library. |
python_install.1514674320.txt.gz · Last modified: by g00r00