Breakthrough-Energy / docs

Documentation
https://breakthrough-energy.github.io/docs/
Creative Commons Attribution 4.0 International
13 stars 14 forks source link

docs: native installation #62

Closed jenhagg closed 3 years ago

jenhagg commented 3 years ago

Purpose

Describe the process for installing the framework natively. The output looks like this

Screen Shot 2021-05-13 at 2 48 38 PM

Time to review

20 mins

kasparm commented 3 years ago

@jon-hagg I'm following these instructions on a Mac using your https://github.com/Breakthrough-Energy/PowerSimData/tree/jon/windows branch. Currently I'm faced with the following error:

    ERROR: Command errored out with exit status 1:
     command: /Users/kmueller/EGM/temp/testPSDWindows/.env/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/7s/mqf3m8s52l78wg_fyl2x768w0000gn/T/pip-install-i_dt87b8/psycopg2/setup.py'"'"'; __file__='"'"'/private/var/folders/7s/mqf3m8s52l78wg_fyl2x768w0000gn/T/pip-install-i_dt87b8/psycopg2/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
         cwd: /private/var/folders/7s/mqf3m8s52l78wg_fyl2x768w0000gn/T/pip-install-i_dt87b8/psycopg2/
    Complete output (23 lines):
    running egg_info
    creating pip-egg-info/psycopg2.egg-info
    writing pip-egg-info/psycopg2.egg-info/PKG-INFO
    writing dependency_links to pip-egg-info/psycopg2.egg-info/dependency_links.txt
    writing top-level names to pip-egg-info/psycopg2.egg-info/top_level.txt
    writing manifest file 'pip-egg-info/psycopg2.egg-info/SOURCES.txt'

    Error: pg_config executable not found.

    pg_config is required to build psycopg2 from source.  Please add the directory
    containing pg_config to the $PATH or specify the full executable path with the
    option:

        python setup.py build_ext --pg-config /path/to/pg_config build ...

    or with the pg_config option in 'setup.cfg'.

    If you prefer to avoid building psycopg2 from source, please install the PyPI
    'psycopg2-binary' package instead.

    For further information please check the 'doc/src/install.rst' file (also at
    <https://www.psycopg.org/docs/install.html>).

    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

I know how to fix that issue but I can't remember what we decided on how a new user should deal with this?

jenhagg commented 3 years ago

We could move psycopg2 to optional-requirements.txt, as it's not currently used other than tests. Will just need to check if it requires moving some import statements.

Edit: done in this PR https://github.com/Breakthrough-Energy/PowerSimData/pull/480