psycopg2 - decide if we need to change the docs to use psycopg2-binary instead

Issue #643 resolved
Ed McDonagh created an issue

From release 2.8 (currently 2.75), the psycopg2 wheel package will be renamed - to continue installing from binary use psycopg2-binary instead.

Although it advises we should build from source rather than relying on binaries, I think for our purposes the binary will suit us well. It may be that using pip install psycopg2-binary will work equally well on Windows and Linux, avoiding the need to find it on http://www.lfd.uci.edu/~gohlke/pythonlibs/#psycopg

Comments (23)

  1. David Platten

    I've just tried to install psycopg2-binary on a Windows OpenREM test install. First, I did pip install psycopg2-binary; then I did pip uninstall psycopg2. The test server failed to run, complaining that it couldn't find the psycopg2 stuff. I solved this by uninstalling psycopg2-binary and psycopg2, and then reinstalling psycopg2-binary. It then worked fine. I think the bottom line is that existing users of psycopg2 must uninstall this first, and then install psycopg2-binary. Hope that makes sense.

  2. David Platten

    That's OK. Yes, existing users can carry on with what they already have. I just wanted to make sure that the binary version worked OK on Windows.

  3. Ed McDonagh reporter

    Python 2 no longer installed by default. Pip install URL changed. Numpy can be installed via pip on Linux - Windows too?. psycopg2-binary means libpq-dev no longer needed. Refs #643. [skip ci] docs only

    → <<cset 6878e9247754>>

  4. Ed McDonagh reporter

    @dplatten - I don't know if it is something you can easily test, but do you know on Windows if you need to install the numpy files from that website, or whether pip install numpy will suffice?

    It does on Ubuntu 18.04 - the current instructions say to install via apt install python-numpy instead...

  5. Ed McDonagh reporter

    Removed libpq-dev from pg install instructions, updated to v10, moved section to bottom as irrelevant for most users. Refs #643 [skip ci] docs only

    → <<cset 344c3a4d35c5>>

  6. David Platten

    I've just installed numpy on Windows in a virtualenv using:

    pip install numpy --no-cache-dir
    

    The --no-cache-dir was to force pip to download any packages, rather than use my local cache.

    The above worked perfectly:

    (numpy_test) D:\David\Code\python\numpy_test>python
    Python 2.7.8 (default, Jun 30 2014, 16:03:49) [MSC v.1500 32 bit (Intel)] on win32
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import numpy
    >>> print numpy.__version__
    1.15.0
    
  7. Log in to comment