-
Notifications
You must be signed in to change notification settings - Fork 50
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
Issue with optparse #1
Comments
Apparently you have to run it from inside of your virtualenv you're wishing to relocate. |
I think that's not true. It's just an option if you want to use I think it's just a bug in the way we try and get the arguments back from optparse: parser = optparse.OptionParser()
parser.add_option('--reinitialize', action='store_true',
help='Updates the python installation '
'and reinitializes the virtualenv.')
parser.add_option('--update-path', help='Update the path for all '
'required executables and helper files that are '
'supported to the new python prefix. You can also set '
'this to "auto" for autodetection.')
options, paths = parser.parse_args()
print options
print paths
if not paths:
paths = ['.']
Leads to this print:
So as we see. We want the variable The fix I think is to add Edit: I'm unsure now. Since this worked when run from within the env... How to refactor it properly. It's definitely broken, but not sure how to fix it elegantly right now. Might take a stab at it later |
I ended up on this page because the docs are wrong here. To get this working, I had to |
This thread is a little stale, it may be a good idea. |
I'm trying to use virtualenv-tools to clone a virtualenv on our servers during deploy, and ran into an issue while using it as described in the docs.
When attempting to run it like this:
virtualenv-tools --update-path=/data/virtualenv/clone6
or this:virtualenv-tools --update-path /data/virtualenv/clone6
, I get the following error:error: . does not refer to a python installation
I added a print statement to debug what
options
andpaths
were being set to:options, paths: {'update_path': '/data/virtualenv/clone6', 'reinitialize': None} []
I ended up running the following command, and it seemed to work:
Should the docs be updated, or am I doing something wrong here?
The text was updated successfully, but these errors were encountered: