pyenv

Pyenv fails to install python on Cygwin: ModuleNotFoundError: No module named '_ctypes'

二次信任 提交于 2019-12-11 05:53:40
问题 I am trying to set up my Cygwin environment to use pyenv for managing python versions. I don't have admin rights so I run the setup with the --no-admin flag. There were some dependencies which I solved using Cygwin package manager application. I got stuck on this one though: ModuleNotFoundError: No module named '_ctypes' I have tried installing libffi and libffi-devel as suggested in many discussions I found. In Cygwin, it doesn't seem to work, or at least pyenv is not using them. Can anyone

MAC 安装多版本 python

痞子三分冷 提交于 2019-12-09 17:01:20
简介 利用Mac包管理工具brew安装pyenv,pyenv用来管理所有python版本。如果没有安装brew,先安装一下吧。 安装pyevn $ brew install pyenv $ pyenv -v pyenv 1.2.6 查看所有的python版本(pyenv管理的所有版本) $ pyenv versions * system (set by /Users/xxx/.pyenv/version) * 表示当前正在使用的版本,system表示用的是系统python版本 查看可安装python版本 $ pyenv install --list Available versions: 2.1.3 2.2.3 2.3.7 ... 选择版本进行安装 $ pyenv install 3.5.5 python-build: use openssl from homebrew python-build: use readline from homebrew Downloading Python-3.5.5.tar.xz... -> https://www.python.org/ftp/python/3.5.5/Python-3.5.5.tar.xz Installing Python-3.5.5... python-build: use readline from homebrew

How can I install Anaconda aside an existing pyenv installation on OSX?

陌路散爱 提交于 2019-12-08 11:17:12
问题 Sincerest apologies if this is easily found elsewhere, but although I found a number of posts with pyenv and Anaconda explanations, none addressed this issue specifically. However, I am often an idiot. On Mac OSX (Mojave 10.14.6) I installed pyenv via Homebrew brew install pyenv And I happily install and switch between Python versions with pyenv install ... and pyenv global ... I typically use VS Code as my IDE. I now have need to do some work in Anaconda. I haven't used it before. Can I

python 多版本管理

好久不见. 提交于 2019-12-06 19:12:04
pyenv 介绍 维护不同版本的 Python 一键(命令)切换全局、本地或当前 shell 使用的 Python 版本 https://github.com/yyuu/pyenv 安装 // MAC 安装 brew install pyenv 使用 // 查看当前 pyenv 可检测到的所有版本,处于激活状态的版本前以 * 标示 pyenv versions // 查看当前处于激活状态的版本,括号中内容表示这个版本是由哪条途径激活的(global、local、shell) pyenv version // 安装 python 3.4.2 pyenv install -v 3.4.2 // 卸载 pyenv uninstall 3.4.2 // 设置全局的 Python 版本,通过将版本号写入 ~/.pyenv/version 文件的方式 pyenv global 3.4.2 // 设置面向程序的本地版本,通过将版本号写入当前目录下的 .python-version 文件的方式。通过这种方式设置的 Python 版本优先级较 global 高 pyenv local 3.4.2 // 设置面向 shell 的 Python 版本,通过设置当前 shell 的 PYENV_VERSION 环境变量的方式。这个版本的优先级比 local 和 global 都要高。 pyenv

saltstack实践

血红的双手。 提交于 2019-12-06 12:19:47
SaltStack实践 参考文档 https://www.cnblogs.com/hackerer/p/6617301.html https://www.cnblogs.com/kevingrace/p/5570290.html https://mp.weixin.qq.com/s?src=11&timestamp=1570590303&ver=1901&signature=JlUshErUkBs-Syqi2CZ3P-pgeYb6ZQgC1wfhjxgc9ryFf-vleiPGex7AiH8tMfIiict1ve6fP4fz6Gt-c771JPR3fEprCKKd4uqbcMrTQ8cQzjZ8l4G0K1XCs8QwDa7j&new=1 https://github.com/watermelonbig/SaltStack-Chinese-ManualBook/blob/master/chapter02/02-2.SaltStack-Fundamentals-%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86.md https://blog.csdn.net/watermelonbig/article/details/84333139 https://docs.saltstack.com/en/latest/contents.html 1.1、环境 linux

pyenv管理多个Python版本

断了今生、忘了曾经 提交于 2019-12-06 03:10:47
前言 我们在CentOS上开发或运行Python程序时,很可能会需要使用不同版本的Python,比如本笔记创建时使用的CentOS是7.4版,系统默认安装的python还是2.7.5,而我们自己开发或者部署时需要的是3.x版本。因为操作系统自带的一些python脚本可能使用的还是2.7.5的代码,所以直接升级系统的python显然不是个好选择。而应对这种情况,我们介绍使用pyenv,这是一个python版本管理工具,它可以实现轻松切换多个python版本。 安装pyenv 1、安装依赖的工具和包 $ yum install -y git $ yum install -y gcc make patch gdbm-devel openssl-devel sqlite-devel readline-devel zlib-devel bzip2-devel libffi-devel 2、安装pyenv pyenv项目官方网址: https://github.com/pyenv/pyenv 官方自动安装工具项目:https://github.com/pyenv/pyenv-installer $ curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash 配置环境变量

Mac OS X下安装pyenv

点点圈 提交于 2019-12-06 02:34:40
Pyenv是python的版本管理工具,pyenv之于python相当于rvm之于ruby。 在Mac OS X下,我用homebrew安装pyenv: brew update brew install pyenv 安装过程中,遇到了下面这个问题 ERROR: The Python ssl extension was not compiled. Missing the OpenSSL lib? 直接安装openssl好像不管用,Google上搜了一下,在pyenv issue #263下找到了解决方法,运行 xcode-select --install 安装一下Xcode Command Line tools,再重新运行一下pyenv的安装命令就好了。 安装好pyenv后,会有以下提示 ==> Caveats To enable shims and autocompletion add to your profile: if which pyenv > /dev/null; then eval "$(pyenv init -)"; fi To use Homebrew's directories rather than ~/.pyenv add to your profile: export PYENV_ROOT=/usr/local/opt/pyenv 按照提示

pytest running with another version of python

谁说胖子不能爱 提交于 2019-12-06 00:05:04
问题 I've installed pyenv and have different versions of python installed with it: $ pyenv versions system 2.7.1 3.2.5 3.5.0 3.5.1 * 3.5.2 I use the following command to switch to python 3.5.2 : pyenv shell 3.5.2 And when I check the python version this is what I get: $ python --version Python 3.5.2 But when I run pytest , it still runs under python 2.7.6 : pytest -v ==================================================================== test session starts ===========================================

Pyenv not auto activating

扶醉桌前 提交于 2019-12-05 21:41:35
I have pyenv installed in my environment and up to this weekend (when I installed 'Kivy') my pyenv/local setup has been working fine. But now when I go to my various python project directories, pyenv does not automatically activate the right python version properly. E.g. I create an environment using pyenv like this, pyenv virtualenv 3.3.2 work I make and go into a dir called work and have a .python-version file with the text work as the sole content. Pyenv detects that my environment is work using this file but my python version is not python 3.3.2 instead it's 2.7.9 . For some reason,

Homebrew pyenv install error dyld: Library not loaded: /usr/local/opt/readline/lib/libreadline.7.dylib

十年热恋 提交于 2019-12-05 21:18:49
After installing pyenv from Homebrew on MacOS Mojave I am getting build errors when attempting to install any python versions. When running pyenv install for any version the build will fail with error: dyld: Library not loaded: /usr/local/opt/readline/lib/libreadline.7.dylib Referenced from: /usr/local/bin/awk Reason: image not found The solution for me was to force link the readline 8 lib that I had under /usr/local/opt/readline/lib/ . > cd /usr/local/opt/readline/lib/ > ls libhistory.8.0.dylib libhistory.a libreadline.8.dylib libreadline.dylib libhistory.8.dylib libhistory.dylib libreadline