Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: native installation #62

Merged
merged 1 commit into from
May 18, 2021
Merged

docs: native installation #62

merged 1 commit into from
May 18, 2021

Conversation

jenhagg
Copy link
Collaborator

@jenhagg jenhagg commented May 13, 2021

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
Copy link
Contributor

kasparm commented May 13, 2021

@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
Copy link
Collaborator Author

jenhagg commented May 13, 2021

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 Breakthrough-Energy/PowerSimData#480

Copy link
Collaborator

@rouille rouille left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the installation goes smoothly now that the psycopg2 package is moved in the optional PowerSimData requirements in this PR.

The framework can be used natively after some initial setup. This first requires the following:

+ install julia 1.5 and create an environment as described in `REISE.jl`_
+ clone `PowerSimData`_ and `REISE.jl`_ (preferably in the same directly)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in the same directly -> in the same directory?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By the way is it prefearable or mandatory. What happens if you don't do it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not actually sure 🙃 not aware of assumptions in the code, but haven't tested in other configurations. Wouldn't be surprised if nesting the repositories or something could cause weirdness, so wanted to encourage following a known setup.


The framework can be used natively after some initial setup. This first requires the following:

+ install julia 1.5 and create an environment as described in `REISE.jl`_
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to be consistent with the rest of the doc, should these bullet points be capitalized?

Copy link
Collaborator

@BainanXia BainanXia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is good to go for now.

@jenhagg jenhagg merged commit fc0c04f into master May 18, 2021
@jenhagg jenhagg deleted the jon/windows branch May 18, 2021 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants