1 Star 0 Fork 0

hexug / pyenv-installer

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

pyenv installer

This tool installs pyenv and friends. It is inspired by rbenv-installer.

Prerequisites

Git installed.

In general, compiling your own Python interpreter requires the installation of the appropriate libraries and packages. The installation wiki provides a list of these for common operating systems.

Installation / Update / Uninstallation

Once prerequisites have been installed correctly:

Install:

curl https://pyenv.run | bash

pyenv.run redirects to the install script in this repository and the invocation above is equivalent to:

curl -L https://gitee.com/hexug/pyenv-installer/raw/master/bin/pyenv-installer | bash

Restart your shell so the path changes take effect:

exec $SHELL

You can now begin using pyenv.

If you need, export USE_GIT_URI to use git:// instead of https:// for git clone.

Update:

pyenv update

Uninstall:

pyenv is installed within $PYENV_ROOT (default: ~/.pyenv). To uninstall, just remove it:

rm -fr ~/.pyenv

then remove these three lines from .bashrc:

export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init --path)"
eval "$(pyenv virtualenv-init -)"

and finally, restart your shell:

exec $SHELL

Using pyenv-installer on Travis CI

Travis itself uses pyenv and therefore PYENV_ROOT is set already. To make it work anyway the installation for pyenv-installer needs to look like this:

[...]
- unset PYENV_ROOT
- curl -L https://gitee.com/hexug/pyenv-installer/raw/master/bin/pyenv-installer | bash
- export PATH="$HOME/.pyenv/bin:$PATH"
- pyenv install 3.5.2

Development and testing

The project on github contains a setup for vagrant to test the installer inside a vagrant managed virtual image.

If you don't know vagrant yet: just install the latest package, open a shell in this project directory and say

vagrant up
vagrant ssh

Now you are inside the vagrant container and your prompt should like something like vagrant@vagrant-ubuntu-trusty-64:~$

The project (this repository) is mapped into the vagrant image at /vagrant

cd /vagrant
python setup.py install
echo 'export PATH="$HOME/.pyenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(pyenv init -)"' >> ~/.bashrc
echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bashrc
source ~/.bashrc

Pyenv should be installed and responding now.

Version History

20190111

  • Remove experimental PyPi support and replace with a dummy package.

20150113

  • Initial release on PyPi.

20130601

  • Initial public release.

License

MIT - see License file.

Copyright (c) 2013-2019 Yamashita, Yuu Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

暂无描述 展开 收起
Shell 等 3 种语言
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/hexug/pyenv-installer.git
git@gitee.com:hexug/pyenv-installer.git
hexug
pyenv-installer
pyenv-installer
master

搜索帮助