Difference between revisions of "Python Software installation"

From rbachwiki
Jump to navigation Jump to search
Line 14: Line 14:
  py -m pip install pyinstaller
  py -m pip install pyinstaller


<p class="subhead"> add this to you code to fix path issues</p>
<p class="subhead"> Add this to you code to fix path issues</p>


<pre>
<pre>
==[[#top|Back To Top]] - [[Python|Category]]==
def resource_path(relative_path):
[[Category:Python]]
    """ Get absolute path to resource, works for dev and for PyInstaller """
    try:
        # PyInstaller creates a temp folder and stores path in _MEIPASS
        base_path = sys._MEIPASS
    except Exception:
        base_path = os.path.abspath(".")
 
    return os.path.join(base_path, relative_path)
</pre>
</pre>
==[[#top|Back To Top]] - [[Python|Category]]==
==[[#top|Back To Top]] - [[Python|Category]]==


[[Category:Python]]
[[Category:Python]]

Revision as of 19:17, 17 March 2023

Install pandas for data analysis

pip install pandas

Install Jupiter notebook

pip install jupyterlab

Start notebook

jupyter notebook

pyinstaller install and setup

pip install pyinstaller

if that doesn't work

py -m pip install pyinstaller

Add this to you code to fix path issues

def resource_path(relative_path):
    """ Get absolute path to resource, works for dev and for PyInstaller """
    try:
        # PyInstaller creates a temp folder and stores path in _MEIPASS
        base_path = sys._MEIPASS
    except Exception:
        base_path = os.path.abspath(".")

    return os.path.join(base_path, relative_path)

Back To Top - Category