Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms


pyenv (5) Versions 1.0.0

Manages pyenv and its installed Python versions.

cookbook 'pyenv', '~> 1.0.0'
cookbook 'pyenv', '~> 1.0.0', :supermarket
knife cookbook site install pyenv
knife cookbook site download pyenv
Quality 89%

pyenv Chef Cookbook

Build Status Chef Version


Manages pyenv and its installed Pythons.

Several custom resources are defined to facilitate this.

WARNING As of v1.0.0, this cookbook no longer provide any recipes. Custom resources are provided instead.



This cookbook requires Chef 12.9+.


  • Debian derivatives
  • Fedora
  • RHEL derivatives (RHEL, CentOS, Amazon Linux, Oracle, Scientific Linux)
  • openSUSE and openSUSE leap


Please read

Examples installtions are provided in test/fixtures/cookbooks/test/recipes

A pyenv_system_install or pyenv_user_install is required to be set so that pyenv knows which version you want to use, and is installed on the system.


Used to install a Python package into the selected pyenv environment. ruby pyenv_pip 'requests' do version # Optional: if passed, the version the python package to install user # Optional: if passed, the user to install the python module for end


pyenv_global '3.6.1' do
  user # Optional: if passed sets the users global version. Do not set, to set the systems global version

If a user is passed in to this resource it sets the global version for the user, under the users root_path (usually ~/.pyenv/version), otherwise it sets the system global version.


Installs a pyenv plugin. ruby pyenv_plugin 'virtualenv' do git_url # Git URL of the plugin git_ref # Git reference of the plugin user # Optional: if passed installs to the users pyenv. Do not set, to set installs to the system pyenv. end


pyenv_rehash 'rehash' do
  user # Optional: if passed rehashes the user pyenv otherwise rehashes the system pyenv


pyenv_python '3.6.1' do
  user         # Optional: if passed, the user pyenv to install to
  pyenv_action # Optional: the action to perform, install, remove etc

Shorter example pyenv_python '3.6.1'.


Runs a pyenv aware script. ruby pyenv_script 'foo' do code # Script code to run pyenv_version # pyenv version to run the script against environment # Optional: Environment to setup to run the script user # Optional: User to run as group # Optional: Group to run as path # Optional: User to run as returns # Optional: Expected return code end

System install

Installs pyenv to the system location, by default /usr/local/pyenv ruby pyenv_system_install 'foo' do git_url # URL of the plugin repo you want to checkout git_ref # Optional: Git reference to checkout update_pyenv # Optional: Keeps the git repo up to date end

User install

Installs pyenv to the user path, making pyenv available to that user only. ruby pyenv_user_install 'vagrant' do git_url # Optional: Git URL to checkout pyenv from. git_ref # Optional: Git reference to checkout e.g. 'master' user # Which user to install pyenv to (also specified in the resources name above) end

System-Wide Mac Installation Note

This cookbook takes advantage of managing profile fragments in an /etc/profile.d directory, common on most Unix-flavored platforms. Unfortunately, Mac OS X does not support this idiom out of the box, so you may need to modify your user profile.


Pull requests are very welcome! Make sure your patches are well tested.

License and Author

Copyright 2014, Shane da Silva Copyright 2017, Darwin D. Wu

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Dependent cookbooks

This cookbook has no specified dependencies.

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

chef-pyenv Changelog


Refactor and update the legacy code base. Recipes are no longer provided, and custom resources are used to manage pyenv installations instead. * update system_install to be a resource * update user_install to be a resource * update script resource * update python resource * update global resource * update rehash resource * create plugin resource * create pip resource * update integration tests * add linting to CI * delete all recipes * delete matchers * delete chef_pyenv_recipe_helpers library * delete chef_pyenv_mixin library * add support for Fedora, RedHat distros and OpenSUSE


  • Add oracle linux support
  • Update syntax for chef-client v13
  • Update gems and dependencies
  • Add integration tests on travis


  • Updated deprecated methods used in attributes.rb


  • Update default pyenv version to v0.4.0-20140516
  • Add support for CentOS 6.5
  • Install make, build-essential, libssl-dev, zlib1g-dev, wget, curl, and llvm on Debian machines


Collaborator Number Metric

1.0.0 failed this metric

Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.

Contributing File Metric

1.0.0 passed this metric

Foodcritic Metric

1.0.0 passed this metric

License Metric

1.0.0 passed this metric

No Binaries Metric

1.0.0 passed this metric

Publish Metric

1.0.0 passed this metric

Supported Platforms Metric

1.0.0 passed this metric

Testing File Metric

1.0.0 passed this metric

Version Tag Metric

1.0.0 passed this metric