python_install
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
python_install [2019/02/17 16:25] – [Troubleshooting] g00r00 | python_install [2023/01/08 12:24] (current) – g00r00 | ||
---|---|---|---|
Line 3: | Line 3: | ||
===== Installation and Requirements ===== | ===== Installation and Requirements ===== | ||
- | Mystic BBS has an embedded Python scripting engine called Mystic Python. | + | Mystic BBS has an embedded Python scripting engine called Mystic Python. |
- | **Note:** The "bit level" of Python must match the "bit level" of Mystic, so if you are using a 32-bit version of Mystic you should install the 32-bit version of Python. | + | **NOTE: The "bit level" of Python must match the "bit level" of Mystic |
In Windows, Python needs to be installed by downloading it from the Website: | In Windows, Python needs to be installed by downloading it from the Website: | ||
- | Most Linux desktop distributions and MacOS will come with Python 2.7 installed by default, and in some cases full Mystic Python functionality will work out of the box without additional steps. | + | In Linux, most come with either |
- | If you are using a Linux operating system | + | **NOTE: With Linux, it may not be possible to mix and match versions of Python |
==== Library Validation / Installation ==== | ==== Library Validation / Installation ==== | ||
- | When initializing Python, Mystic will be attempting to locate the following | + | When initializing Python, Mystic will be attempting to locate the following |
+ | |||
+ | Python 2.x: | ||
Windows: python27.dll | Windows: python27.dll | ||
Line 21: | 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: | ||
- | You can check to see if you have the proper library installed by searching the results of ldconfig: | + | Windows: |
- | + | | |
- | | + | |
| | ||
- | Note that some Linux distributions come with a Python 2.7 package or installation that is compiled in a way that does not work well with embedded Python applications. | + | Linux: |
- | + | Intel 32-bit: / | |
- | If the above command does not find anything but " | + | Intel 64-bit: / |
+ | ARM: /lib, /usr/lib, / | ||
+ | |||
+ | In the event that Mystic cannot | ||
+ | |||
+ | 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. | ||
- | |||
- | If you cannot locate libpython2 then it may be that you do not have Python 2 installed or that you have a partial installation of Python 2. You will likely need to install Python 2.7 and then possibly create a symbolic link as described above. | ||
- | |||
- | sudo apt-get update | ||
- | sudo apt-get install libpython2.7 | ||
- | |||
- | ==== 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 documentation. | ||
- | |||
- | | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | 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 modules (in either source or | ||
- | | ||
- | | ||
- | 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 program as the variable sys.path | ||
- | |||
- | ==== Troubleshooting ==== | ||
- | |||
- | For more information, | ||
- | |||
- | === Windows === | ||
- | |||
- | The most common Windows issue is that the wrong version of Python is installed. | ||
- | |||
- | === Unix === | ||
- | |||
- | The most common issue in Unix based platforms is that a link is not created to the Python library. | ||
- | Like the Windows version, another issue some people have ran into is that their bit level of Python | + | ==== Missing |
- | **NOTE: Some Linux distributions come with a pre-installed | + | For Windows, simply go to the Python |
- | When Python is compiled wrong, it will have issues loading some modules resulting in an error when you execute the Mystic | + | For Linux you can try to install by package manager, although |
- | for embedded applications, | + | |
- | The following steps can be used to reinstall Python 2.7 on Ubuntu 18.04 LTS: | + | 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 |
**INSTALL PREREQUISITES: | **INSTALL PREREQUISITES: |
python_install.1550442338.txt.gz · Last modified: by g00r00