Pex: Could not satisfy all requirements
Asked Answered
J

1

9

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?

Juice answered 12/9, 2015 at 0:39 Comment(0)
M
2

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 ./
Molly answered 11/4, 2016 at 12:21 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.