Closed killthrush closed 7 years ago
Hi @killthrush , thanks for posting the issue. We'll check it and let you know as soon as we find the problem.
Thanks, Avi
I found the discussion "Behavior of --user in virtualenv" helpful. It seems there is at least one way to make virtualenv support user site directories: use the --system-site-packages switch when creating the environment. I don't understand the rationale for virtualenv not supporting this by default. Hopefully there's a way to support user site directories without getting the system site packages as well, though I didn't find one.
I believe I reproduced the issue and --system-site-packages fixed it.
Fails: $ virtualenv myenv $ source myenv/bin/activate $ npm install dependency_using_nopy
Works: $ virtualenv myenv --system-site-packages $ source myenv/bin/activate $ npm install dependency_using_nopy
Out of curiosity, what drove you to run the npm install
inside a virtualenv?
@odedniv I'm using serverless for lambdas written in python 3.6, so I'm always in a virtualenv when in the terminal.
Unfortunately currently there is no solution due to virtualenv's strictness (being unable to execute a specific python run with user site). My recommendation for you right now is to run npm install
and serverless puresec gen-roles
out of virtualenv (it shouldn't interfere with your usage as far as I can tell), or create the virtualenv the way @alastairpatrick mentioned above.
Let us know if that solution helps
Yeah, that workaround is fine for me - I don't need to run it all that often. Thanks!
Hi, ran into a minor issue today with installation - from within an active
virtualenvwrapper
session, the plugin installer fails with the following error:It didn't seem to matter which version of Node was active (7 or 8), and yarn and NPM fail with the same error. Not really sure whether this is an issue with
nopy
or the plugin installer -nopy
installs fine by itself.I was able to work around this issue by deactivating my python virtualenv.
Any thoughts on this?