pip currently vendors `lockfile` but it is deprecated as on Oct 2017. pip should start using some other package -- lockfile's README suggests `fasteners`.