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

Doesn't work with python3 #204

Closed
jeroenjacobs79 opened this issue Jul 4, 2015 · 3 comments
Closed

Doesn't work with python3 #204

jeroenjacobs79 opened this issue Jul 4, 2015 · 3 comments
Assignees

Comments

@jeroenjacobs79
Copy link

trying to install python 3.4 and create a virtualenv for it on Ubuntu 14.04. Fails with error:

==> default: Error: sh: 1: virtualenv-3.4: not found
==> default: sh: 1: /srv/django-envs/pymania/bin/pip: not found
==> default: sh: 1: /srv/django-envs/pymania/bin/pip: not found
==> default:
==> default: Error: /Stage[main]/Python-env/Python::Virtualenv[/srv/django-projects/pymania]/Exec[python_virtualenv_/srv/django-envs/pymania]/returns: change from notrun to 0 failed: sh: 1: virtualenv-3.4: not found

This is the Puppet file:

class python-env {
class { 'python':
version => '3.4',
pip => true,
dev => true,
virtualenv => true,
}
python::virtualenv { '/srv/django-projects/pymania' :
ensure => present,
version => '3.4',
systempkgs => true,
distribute => false,
venv_dir => '/srv/django-envs/pymania',
owner => 'root',
group => 'root',
cwd => '/srv/django-projects/pymania',
timeout => 0,
require => File['/srv/django-envs/']
}
file { "/srv/django-projects/":
ensure => "directory",
}
file { "/srv/django-envs/":
ensure => "directory",
}

}

@Faulik
Copy link

Faulik commented Jul 7, 2015

It kinda works. Add this line at the end:

python::virtualenv { '/srv/django-projects/pymania' :
ensure => present,
~
virtualenv   => "virtualenv"
}

This part( https://github.com/stankevich/puppet-python/blob/master/manifests/virtualenv.pp#L98-L105 ) makes strange assumptions and trying to run virtualenv-$version instead of simple virtualenv for some reason.

@shivapoudel
Copy link
Contributor

@Faulik thanks for briefing :)

@jeroenjacobs79
Copy link
Author

@Faulik Thanks. It seems this issue occurs when I have virtualenv installed via apt. uninstalling it, and re-installing virtualenv via pip seems to solve the issue too.

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

4 participants