vitorfs / parsifal

Parsifal is a tool to assist researchers to perform Systematic Literature Reviews
https://parsif.al
MIT License
415 stars 172 forks source link

mendeley 0.3.2 requires requests==2.5.1, but you'll have requests 2.7.0 which is incompatible. #58

Closed yuuyins closed 2 years ago

yuuyins commented 3 years ago

Description

Trying to install Parsifal on a Nix environment, I get

ERROR: pip's legacy dependency resolver does not consider dependency conflicts when selecting packages. This behaviour is the source of the following dependency conflicts.
mendeley 0.3.2 requires requests==2.5.1, but you'll have requests 2.7.0 which is incompatible.

Reproduce

  1. Install Nix
  2. Get https://github.com/vitorfs/parsifal/commit/ec84153e744b8f025e39a3ccdae3fdb9e70bf409
  3. Go to directory parsifal
  4. Create file shell.nix

    let
      pkgs = import <nixpkgs> {};
      name = "pip-env";
      venvDir = "./.venv";
    in with pkgs; mkShell rec {
      inherit name venvDir;
    
      buildInputs = [
        python27
        python27Packages.pip
        python27Packages.setuptools
        python27Packages.virtualenv # Needed when using python 2.7
        python27Packages.wheel
        postgresql_9_6
      ];
    
      # This is very close to how venvShellHook is implemented, but
      # adapted to use 'virtualenv'
      shellHook = ''
        SOURCE_DATE_EPOCH=$(date +%s)
    
        if [ -d "${venvDir}" ]; then
          printf "%s\n" "Skipping venv creation, '${venvDir}' already exists"
        else
          printf "%s\n" "Creating new venv environment in path: '${venvDir}'"
          # Note that the module venv was only introduced in python 3, so for 2.7
          # this needs to be replaced with a call to virtualenv
          ${python27Packages.virtualenv}/bin/virtualenv "${venvDir}"
        fi
    
        # Under some circumstances it might be necessary to add your virtual
        # environment to PYTHONPATH, which you can do here too;
        PYTHONPATH=$PWD/${venvDir}/${python27Packages.python.sitePackages}/:$PYTHONPATH
    
        source "${venvDir}/bin/activate"
    
        # As in the previous example, this is optional.
        pip install -r requirements.txt
      '';
    }
  5. Run nix-shell --pure --show-trace shell.nix
vitorfs commented 2 years ago

Thanks for reporting this issue! I'm closing it now because the project is no longer using Mendeley