Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setuptools can't find 'find_namespace_packages' #536

Open
nckswt opened this issue Aug 28, 2020 · 0 comments
Open

Setuptools can't find 'find_namespace_packages' #536

nckswt opened this issue Aug 28, 2020 · 0 comments

Comments

@nckswt
Copy link

nckswt commented Aug 28, 2020

I have a package I'm trying to deploy, but It looks like setuptools doesn't have find_namespace_packages. This project had previously compiled, but I'd recently added a (private) dependency that uses find_namespace_packages and now deploys are broken.

I'm pretty surprised by this, given that find_namespace_pacakges was introduced in Python 3.3 and the docker image is clearly using /usr/bin/python3.8.

I haven't (to my knowledge) done anything that might clobber the setuptools import path... what gives? Honestly not sure where to start debugging this. Possibly making my own version of the builder dockerfile? Or asking about this issue there? Is this the same issue as noted here?

$ ./node_modules/serverless/bin/serverless.js deploy -vvv -r us-east-1 -s stg --acct stg --force
Serverless: Generating requirements.txt from Pipfile...
Serverless: Parsed requirements.txt from Pipfile in /home/nick/sandbox/tycho/tycho-map-processor-service/.serverless/requirements.txt...
Serverless: Installing requirements from /home/nick/.cache/serverless-python-requirements/241bdb14788154d50092559135c41a90facb327c58c7991141c2ee50d37c88dc_slspyc/requirements.txt ...
Serverless: Using download cache directory /home/nick/.cache/serverless-python-requirements/downloadCacheslspyc
Serverless: Running ...
 
  Error --------------------------------------------------
 
  Error: STDOUT: Looking in links: https://download.pytorch.org/whl/torch_stable.html
  Processing /home/nick/sandbox/tycho/tycho-map-processor-service
  
  
  STDERR:     ERROR: Command errored out with exit status 1:
       command: /usr/bin/python3.8 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-emb8dhx3/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-emb8dhx3/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-7ii6zzfu
           cwd: /tmp/pip-req-build-emb8dhx3/
      Complete output (5 lines):
      Traceback (most recent call last):
        File "<string>", line 1, in <module>
        File "/tmp/pip-req-build-emb8dhx3/setup.py", line 4, in <module>
          from setuptools import setup, find_namespace_packages
      ImportError: cannot import name 'find_namespace_packages' from 'setuptools' (/usr/lib/python3/dist-packages/setuptools/__init__.py)
      ----------------------------------------
  ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  
      at /home/nick/sandbox/tycho/tycho-map-processor-service/node_modules/serverless-python-requirements/lib/pip.js:325:13
      at Array.forEach (<anonymous>)
      at installRequirements (/home/nick/sandbox/tycho/tycho-map-processor-service/node_modules/serverless-python-requirements/lib/pip.js:312:28)
      at installRequirementsIfNeeded (/home/nick/sandbox/tycho/tycho-map-processor-service/node_modules/serverless-python-requirements/lib/pip.js:556:3)
      at ServerlessPythonRequirements.installAllRequirements (/home/nick/sandbox/tycho/tycho-map-processor-service/node_modules/serverless-python-requirements/lib/pip.js:635:29)
      at ServerlessPythonRequirements.tryCatcher (/home/nick/sandbox/tycho/tycho-map-processor-service/node_modules/serverless-python-requirements/node_modules/bluebird/js/release/util.js:16:23)
      at Promise._settlePromiseFromHandler (/home/nick/sandbox/tycho/tycho-map-processor-service/node_modules/serverless-python-requirements/node_modules/bluebird/js/release/promise.js:547:31)
      at Promise._settlePromise (/home/nick/sandbox/tycho/tycho-map-processor-service/node_modules/serverless-python-requirements/node_modules/bluebird/js/release/promise.js:604:18)
      at Promise._settlePromise0 (/home/nick/sandbox/tycho/tycho-map-processor-service/node_modules/serverless-python-requirements/node_modules/bluebird/js/release/promise.js:649:10)
      at Promise._settlePromises (/home/nick/sandbox/tycho/tycho-map-processor-service/node_modules/serverless-python-requirements/node_modules/bluebird/js/release/promise.js:729:18)
      at _drainQueueStep (/home/nick/sandbox/tycho/tycho-map-processor-service/node_modules/serverless-python-requirements/node_modules/bluebird/js/release/async.js:93:12)
      at _drainQueue (/home/nick/sandbox/tycho/tycho-map-processor-service/node_modules/serverless-python-requirements/node_modules/bluebird/js/release/async.js:86:9)
      at Async._drainQueues (/home/nick/sandbox/tycho/tycho-map-processor-service/node_modules/serverless-python-requirements/node_modules/bluebird/js/release/async.js:102:5)
      at Immediate.Async.drainQueues [as _onImmediate] (/home/nick/sandbox/tycho/tycho-map-processor-service/node_modules/serverless-python-requirements/node_modules/bluebird/js/release/async.js:15:14)
      at processImmediate (internal/timers.js:439:21)
      at process.topLevelDomainCallback (domain.js:131:23)
 
     For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.
 
  Get Support --------------------------------------------
     Docs:          docs.serverless.com
     Bugs:          github.com/serverless/serverless/issues
     Issues:        forum.serverless.com
 
  Your Environment Information ---------------------------
     Operating System:          linux
     Node Version:              12.13.0
     Framework Version:         1.79.0
     Plugin Version:            3.7.1
     SDK Version:               2.3.1
     Components Version:        2.34.7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant