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

Fix windows platform installation #480

Merged
merged 5 commits into from
Oct 13, 2020
Merged

Fix windows platform installation #480

merged 5 commits into from
Oct 13, 2020

Conversation

lalitpagaria
Copy link
Contributor

To fix #446

@tanaysoni Please review

@tanaysoni tanaysoni self-requested a review October 12, 2020 15:16
Copy link
Contributor

@tanaysoni tanaysoni left a comment

Choose a reason for hiding this comment

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

Hi @lalitpagaria, thank you for the PR!

@Zenahr
Copy link
Contributor

Zenahr commented Oct 12, 2020

@lalitpagaria tested. Failed. We need to take care of psycopg2 as well.

Stacktrace:

Collecting psycopg2-binary
  Downloading psycopg2-binary-2.8.6.tar.gz (384 kB)
     |████████████████████████████████| 384 kB 3.3 MB/s
    ERROR: Command errored out with exit status 1:
     command: 'd:\open-source\nlp\haystack\env\scripts\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\STUDIUM\\AppData\\Local\\Temp\\pip-install-bvyab45q\\psycopg2-binary\\setup.py'"'"'; __file__='"'"'C:\\Users\\STUDIUM\\AppData\\Local\\Temp\\pip-install-bvyab45q\\psycopg2-binary\\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 'C:\Users\STUDIUM\AppData\Local\Temp\pip-pip-egg-info-lunzv2uj'
         cwd: C:\Users\STUDIUM\AppData\Local\Temp\pip-install-bvyab45q\psycopg2-binary\
    Complete output (23 lines):
    running egg_info
    creating C:\Users\STUDIUM\AppData\Local\Temp\pip-pip-egg-info-lunzv2uj\psycopg2_binary.egg-info
    writing C:\Users\STUDIUM\AppData\Local\Temp\pip-pip-egg-info-lunzv2uj\psycopg2_binary.egg-info\PKG-INFO    
    writing dependency_links to C:\Users\STUDIUM\AppData\Local\Temp\pip-pip-egg-info-lunzv2uj\psycopg2_binary.egg-info\dependency_links.txt
    writing top-level names to C:\Users\STUDIUM\AppData\Local\Temp\pip-pip-egg-info-lunzv2uj\psycopg2_binary.egg-info\top_level.txt
    writing manifest file 'C:\Users\STUDIUM\AppData\Local\Temp\pip-pip-egg-info-lunzv2uj\psycopg2_binary.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.

@Zenahr
Copy link
Contributor

Zenahr commented Oct 12, 2020

@lalitpagaria It might be worth considering adding psycopg2-binary instead of psycopg2 to the dependencies. However, I remember I had trouble installing it using that and reserved to building it from source. I can put up a working repository with my working windows setup. Including the requirements.txt file of course if that helps.

For some reason running pip install psycopg2-binary on it's own leads to the same trace from above.

Apparently this is a known issue

@lalitpagaria
Copy link
Contributor Author

lalitpagaria commented Oct 12, 2020

@Zenahr Thank you for testing out. I just pushed another change and removed psycopg2-binary and uvloop form the requirements file, as these are not used inside haystack code base. From history what found that older version of farm had these dependencies (by checking Tutorial6_Better_Retrieval_via_DPR.ipynb)

Copy link
Contributor

@Zenahr Zenahr left a comment

Choose a reason for hiding this comment

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

lgtm

@lalitpagaria
Copy link
Contributor Author

lgtm

@tanaysoni fyi

@tanaysoni
Copy link
Contributor

Thanks again for working on this @lalitpagaria & @Zenahr. I re-added uvloop as a conditional requirement as it might be useful when running the REST APIs.

@tanaysoni tanaysoni merged commit 12c4dd7 into deepset-ai:master Oct 13, 2020
@lalitpagaria lalitpagaria deleted the fix_windows_installation branch October 13, 2020 15:23
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.

Unable to install latest haystack version on Windows
3 participants