Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pex: Could not satisfy all requirements

I'm trying to package a python virtual environment using pex, but can't seem to shake off the "Could not satisfy all requirements for..." error. This is either me being a total python newb question, or an ask to help me find out to figure out what these pesky requirements are that pex couldn't satisfy.

Here's the error message I'm seeing:

(env-rba-deploy)my_machine:env-rba-deploy my_user$ pex -v --disable-cache -r <(pip freeze) -o foo.pex
Could not satisfy all requirements for rba-deploy==1.6.0:
    rba-deploy==1.6.0

The python code I'm trying to package is here:

enter image description here

My setup.py looks like this:

#!/usr/bin/env python

from distutils.core import setup

setup(name='rba-deploy',
  version='v1.6.0',
  description='blah',
  author='Dude',
  author_email='blah',
  url='https://www.foo.bar.baz',
  package_dir = {'':'lib'},
  packages=['rba','rba/response']
 )

Here is the pip list and pex version:

(env-rba-deploy)my_computer:env-rba-deploy my_user$ pex --version
pex 1.0.3
(env-rba-deploy)my_computer:env-rba-deploy my_user$ pip list
pip (7.1.2)
rba-deploy (1.6.0)
setuptools (18.2)
wheel (0.24.0)

What the heck am I missing?

like image 416
Pat K Avatar asked Sep 12 '15 00:09

Pat K


1 Answers

The '-r' for requirements is going to try and download your package from pypi but if you haven't uploaded it then it won't work.

Instead of the pip freeze command just point at setup.py directory using a '.' or './'

pex -v --disable-cache -o foo.pex ./
like image 97
Tim Hughes Avatar answered Nov 19 '22 18:11

Tim Hughes