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

If virtualenv isn't installed, it isn't properly detected or installed. #50

Closed
mfrobben opened this issue Jan 5, 2014 · 9 comments · Fixed by #60
Closed

If virtualenv isn't installed, it isn't properly detected or installed. #50

mfrobben opened this issue Jan 5, 2014 · 9 comments · Fixed by #60

Comments

@mfrobben
Copy link

mfrobben commented Jan 5, 2014

A few bugs from the recent changes that use Facter to locate versions...

Could not retrieve virtualenv_version: can't convert Symbol into String
Could not retrieve virtualenv_version: can't convert Symbol into String
Python 2.7.4
Could not retrieve python_version: undefined method `[]' for nil:NilClass
Python 2.7.4
Could not retrieve python_version: undefined method `[]' for nil:NilClass

Error: /Stage[main]/Lint/Python::Virtualenv[/srv/lint/]/Exec[python_virtualenv_/srv/lint/]/returns: change from notrun to 0 failed: sh: 1: virtualenv: not found
@jonblack
Copy link

I can confirm this issue. Installing python-virtualenv prior to using this module works around the issue.

@daenney
Copy link
Member

daenney commented Jan 12, 2014

Did you actually pass virtualenv=true or virtualenv=pip to this class when you used it?

# [*virtualenv*]
#  Install python-virtualenv. Default: false, also accepts 'pip' which will
#  install latest virtualenv from pip rather than package manager

@jonblack
Copy link

I've used the following settings:

class { 'python':
  version    => 'system',
  pip        => true,
  dev        => true,
  virtualenv => true,
  gunicorn   => true,
}

I wasn't aware that pip is an option for virtualenv. That's not documented on the forge page.

@mfrobben
Copy link
Author

I passed virtualenv=true. 

If all I needed was virtualenv=pip, let me know and I will fix the docs. 

Sent from Mailbox for iPhone

On Sun, Jan 12, 2014 at 5:05 AM, Jon Black [email protected]
wrote:

I've used the following settings:

class { 'python':
  version    => 'system',
  pip        => true,
  dev        => true,
  virtualenv => true,
  gunicorn   => true,
}

I wasn't aware that pip is an option for virtualenv. That's not documented on the forge page.

Reply to this email directly or view it on GitHub:
#50 (comment)

@stankevich
Copy link
Collaborator

@mfrobben that'd be great, thank you!

@prophile
Copy link

Also experiencing this bug, using virtualenv => pip or virtualenv => false has no effect.

@prophile
Copy link

A quick bisection suggests that 1769155 introduced the problem.

@mcandre
Copy link

mcandre commented Feb 9, 2014

+1 I'm experiencing this bug as well. :(

@jesalg
Copy link

jesalg commented Feb 24, 2014

+1

hakamadare added a commit to huit/puppet-python that referenced this issue Feb 26, 2014
on RHEL systems, `pkg.retrieve[pkg.property(:ensure)]` returns `:absent`
when a package is not installed; this can generate an unsightly error
when running these facts on a RHEL system where the necessary OS
packages are not installed:

    [root@gepeto ~]# facter -p osfamily
    RedHat
    [root@gepeto ~]# facter -p lsbmajdistrelease
    5
    [root@gepeto ~]# grep version /etc/puppet/modules/python/Modulefile
    version      '1.6.3'
    [root@gepeto ~]# facter -p virtualenv_version pip_version
    Could not retrieve virtualenv_version: can't convert Symbol into String
    Could not retrieve pip_version: undefined method `[]' for nil:NilClass
    Could not retrieve pip_version: can't convert Symbol into String
    pip_version =>
    virtualenv_version =>

Fixes voxpupuli#50
shivapoudel pushed a commit that referenced this issue Sep 1, 2015
on RHEL systems, `pkg.retrieve[pkg.property(:ensure)]` returns `:absent`
when a package is not installed; this can generate an unsightly error
when running these facts on a RHEL system where the necessary OS
packages are not installed:

    [root@gepeto ~]# facter -p osfamily
    RedHat
    [root@gepeto ~]# facter -p lsbmajdistrelease
    5
    [root@gepeto ~]# grep version /etc/puppet/modules/python/Modulefile
    version      '1.6.3'
    [root@gepeto ~]# facter -p virtualenv_version pip_version
    Could not retrieve virtualenv_version: can't convert Symbol into String
    Could not retrieve pip_version: undefined method `[]' for nil:NilClass
    Could not retrieve pip_version: can't convert Symbol into String
    pip_version =>
    virtualenv_version =>

Fixes #50
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

Successfully merging a pull request may close this issue.

7 participants