User Tools

Site Tools


python_install

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
python_install [2019/02/17 16:20] – [Installation and Requirements] g00r00python_install [2019/03/10 09:18] – [Troubleshooting] g00r00
Line 11: Line 11:
 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.  However some of the more popular installations such as Ubuntu and Mint Linux do not come with Python installed with shared libraries enabled, which means it will not work with embedded Python applications like Mystic. 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.  However some of the more popular installations such as Ubuntu and Mint Linux do not come with Python installed with shared libraries enabled, which means it will not work with embedded Python applications like Mystic.
  
-If you are using a Linux operating system with this issue then modules such as "sqlite3" will fail when they are included in a script with an error mentioning Py_ZeroStruct being missing.  In order to fix this issue, a new Python will have to be compiled in a way that is compatible with Mystic.  See the Troubleshooting section below for steps to compile and install Python properly.+If you are using a Linux operating system with this issue then modules such as "sqlite3" will fail when they are included in a script with an error mentioning Py_ZeroStruct.  In order to fix this issue, a new Python will have to be compiled in a way that is compatible with Mystic.  See the Troubleshooting section below for steps to compile and install Python properly.
  
 ==== Library Validation / Installation ==== ==== Library Validation / Installation ====
Line 93: Line 93:
  
 The most common Windows issue is that the wrong version of Python is installed.  It is absolutely a requirement that you download the 32-bit version of Python if using 32-bit version of Mystic, and the 64-bit version of Python if using the 64-bit version of Mystic. The most common Windows issue is that the wrong version of Python is installed.  It is absolutely a requirement that you download the 32-bit version of Python if using 32-bit version of Mystic, and the 64-bit version of Python if using the 64-bit version of Mystic.
 +
 +If you get an error similar to "“Importerror: No module named site" when your script tries to import a module, this
 +means you need to set your Python environment variables.  See the section above for information and an example of
 +how to do this in Windows.
  
 === Unix === === Unix ===
Line 117: Line 121:
   * sudo tar xzf Python-2.7.15.tgz   * sudo tar xzf Python-2.7.15.tgz
   * cd /usr/src/Python-2.7.15   * cd /usr/src/Python-2.7.15
-  * sudo ./configure --enable-optimizations --enable-unicode=ucs4 --enable-shared+  * sudo ./configure -enable-optimizations -enable-unicode=ucs4 -enable-shared
   * sudo make install   * sudo make install
  
python_install.txt · Last modified: 2023/01/08 12:24 by g00r00

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki