__pycache__ conflict · Issue #54 · serverless/serverless-python-requirements · GitHub
Skip to content
This repository was archived by the owner on Oct 24, 2025. It is now read-only.
This repository was archived by the owner on Oct 24, 2025. It is now read-only.

__pycache__ conflict #54

Description

@winstonewert

I get the following when I try to deploy

Serverless: Parsing Python requirements.txt
Serverless: Installing required Python packages for runtime python3.6...
Serverless: Linking required Python packages...
 
  Error --------------------------------------------------
 
  Unable to link dependency '__pycache__' because a file
                             by the same name exists in this service
 
     For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.
 
  Stack Trace --------------------------------------------
 
Error: Unable to link dependency '__pycache__' because a file
                             by the same name exists in this service
    at fse.readdirSync.map (/home/winstonewert/projects/domain-influencer-engine/node_modules/serverless-python-requirements/index.js:162:19)
    at Array.map (native)
    at ServerlessPythonRequirements.linkRequirements (/home/winstonewert/projects/domain-influencer-engine/node_modules/serverless-python-requirements/index.js:151:40)
From previous event:
    at Object.before [as hook] (/home/winstonewert/projects/domain-influencer-engine/node_modules/serverless-python-requirements/index.js:249:10)
    at BbPromise.reduce (/home/winstonewert/projects/domain-influencer-engine/node_modules/serverless/lib/classes/PluginManager.js:236:55)
From previous event:
    at PluginManager.invoke (/home/winstonewert/projects/domain-influencer-engine/node_modules/serverless/lib/classes/PluginManager.js:236:22)
    at PluginManager.spawn (/home/winstonewert/projects/domain-influencer-engine/node_modules/serverless/lib/classes/PluginManager.js:248:17)
    at Deploy.BbPromise.bind.then.then (/home/winstonewert/projects/domain-influencer-engine/node_modules/serverless/lib/plugins/deploy/deploy.js:101:50)
From previous event:
    at Object.before:deploy:deploy [as hook] (/home/winstonewert/projects/domain-influencer-engine/node_modules/serverless/lib/plugins/deploy/deploy.js:99:10)
    at BbPromise.reduce (/home/winstonewert/projects/domain-influencer-engine/node_modules/serverless/lib/classes/PluginManager.js:236:55)
From previous event:
    at PluginManager.invoke (/home/winstonewert/projects/domain-influencer-engine/node_modules/serverless/lib/classes/PluginManager.js:236:22)
    at PluginManager.run (/home/winstonewert/projects/domain-influencer-engine/node_modules/serverless/lib/classes/PluginManager.js:255:17)
    at variables.populateService.then (/home/winstonewert/projects/domain-influencer-engine/node_modules/serverless/lib/Serverless.js:99:33)
    at runCallback (timers.js:781:20)
    at tryOnImmediate (timers.js:743:5)
    at processImmediate [as _immediateCallback] (timers.js:714:5)
From previous event:
    at Serverless.run (/home/winstonewert/projects/domain-influencer-engine/node_modules/serverless/lib/Serverless.js:86:74)
    at serverless.init.then (/home/winstonewert/projects/domain-influencer-engine/node_modules/serverless/bin/serverless:39:50)
    at <anonymous>
 
  Get Support --------------------------------------------
     Docs:          docs.serverless.com
     Bugs:          github.com/serverless/serverless/issues
     Forums:        forum.serverless.com
     Chat:          gitter.im/serverless/serverless
 
  Your Environment Information -----------------------------
     OS:                     linux
     Node Version:           8.2.1
     Serverless Version:     1.19.0

The situation is caused by both .requirements and my folder containing a pycache folder.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions