pyenv

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

我们两清 提交于 2019-12-22 08:57:15
问题 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 回答1: 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

How to implement locking in a multi process system?

可紊 提交于 2019-12-21 22:12:57
问题 We are running lots of jenkins projects in parallel. We are using python, and we have chosen to manage the virtual environments with pyenv. Unfortunately, pyenv has a well-known race condition. To work around the problem, I would like to implement locking at the process level. What I want to do is: lock some resource (a file?) do my pyenv stuff unlock the resource My scripts are written in bash. How can I implement resource locking / unlocking in bash? 回答1: So your friend in the unix world

Unable to install 32-bit Python with pyenv, despite appropriate flags set

僤鯓⒐⒋嵵緔 提交于 2019-12-20 07:35:13
问题 I'm looking to install the 2.6.6 Python as 32-bit with pyenv on OS X, but get: ERROR: The Python ssl extension was not compiled. Missing the OpenSSL lib? Despite having consulted Common Build Problems, and applying the flags suggested there, as well as installing Xcode developer tools, the problem persists. Here is the full command: CFLAGS="-I$(xcrun --show-sdk-path)/usr/include -arch i386 -I$(brew --prefix openssl)/include" LDFLAGS="-arch i386 -L$(brew --prefix openssl)/lib" CONFIGURE_OPTS="

pyenv prints module in terminal when executing said module

99封情书 提交于 2019-12-20 05:49:12
问题 I've moved over to using pyenv when running python. The problem though is when I execute a module and that module imports other module pyenv will often print a huge chunk of what to me is gibberish. For example, alias py37="pyenv local 3.7.3 && python" Admins-MacBook-Pro-4:general kylefoley$ py37 Python 3.7.3 (default, Oct 16 2019, 03:01:07) [Clang 10.0.1 (clang-1001.0.46.4)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import keyboard bool b'B'

python多版本管理器pyenv

倾然丶 夕夏残阳落幕 提交于 2019-12-16 19:13:46
查看Linux版本``` [root@web ~]# cat /etc/redhat-release CentOS Linux release 7.6.1810 (Core) [root@web ~]# uname -a Linux web 3.10.0-957.21.3.el7.x86_64 #1 SMP Tue Jun 18 16:35:19 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux 1 [root@web ~]# cat /etc/redhat-release 2 CentOS Linux release 7.6.1810 (Core) 3 [root@web ~]# uname -a 4 Linux web 3.10.0-957.21.3.el7.x86_64 #1 SMP Tue Jun 18 16:35:19 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux    ``` 安装依赖``` [root@web ~]# yum -y install gcc zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz

Python - Linux下多版本安装工具 - pyenv

瘦欲@ 提交于 2019-12-15 21:24:45
官网 https://github.com/pyenv/pyenv 快捷安装 https://github.com/pyenv/pyenv#the-automatic-installer # yum install git curl python编译依赖如下 # yum install gcc make patch gdbm-devel openssl-devel sqlite-devel readline-devel zlib-devel bzip2-devel 创建普通用户 # useradd python # su - python 在python用户下安装 $ curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash 由于某些原因,浏览器可以访问,大家自行下载保存为shell脚本执行 https://raw.githubusercontent.com/pyenv/pyenv-installer/master/bin/pyenv-installer 或者使用项目源码文件 https://github.com/pyenv/pyenv-installer/blob/master/bin/pyenv-installer 以后更新pyenv使用 $ pyenv

uwsgi fails under pyenv/2.7.11 with _io.so: undefined symbol: _PyCodecInfo_GetIncrementalEncoder

試著忘記壹切 提交于 2019-12-13 18:45:19
问题 when i start uwsgi 2.0.11.2 under pyenv 2.7.11 i get: ImportError: /home/user/.pyenv/versions/2.7.11/envs/master2/lib/python2.7/lib-dynload/_io.so: undefined symbol: _PyCodecInfo_GetIncrementalEncoder also uwsgi prints Python version: 2.7.10 (default, May 30 2015, 13:57:08) [GCC 4.8.2] not sure how to fix it 回答1: I had the same (or better: a similar) problem with uwsgi when upgrading Python from 2.7.3 to 2.7.10 : The module that I tried to import was socket ( socket.py ) Which in turn tried

How to build gdb under pyenv environment

前提是你 提交于 2019-12-13 16:15:57
问题 I'm trying to build gdb with python 2.7.12 installed by pyenv. Python install command was pyenv install 2.7.12 -k Then I executed commands like below to build gdb. wget ftp://sourceware.org/pub/gdb/releases/gdb-8.1.tar.gz tar xvf gdb-8.1.tar.gz cd gdb-8.1 ./configure --with-python=$(pyenv which python) --prefix=/usr/local CFLAGS="-g -O2 -Wno-string-plus-int" make But it failed and I got these errors. configure: WARNING: MPFR is missing or unusable; some features may be unavailable. checking

Looking for a cross-platform (Linux, MacOS, Windows) tool for managing Python environments

早过忘川 提交于 2019-12-13 03:59:01
问题 I was investigating the use of Anaconda environments for CI/CD (since, to my knowledge, it is the only platform that supports Linux, MacOS, and Windows). I tried to use Miniconda which is supposed to only install the bare minimum. However, I realised that, by default, Miniconda is not "mini" after all. For example, if I attempt to create a new Python environment ( conda create -n py36 python=3.6 anaconda ), it will install a bunch of not needed stuff like JupyterLab and others. So, before

Keeping the same, shared virtualenvs when switching from pyenv-virtualenv to pipenv

限于喜欢 提交于 2019-12-13 01:27:26
问题 I started looking at pipenv and it seems to be pretty good. My only concern is, that most of my projects involve numpy , scipy and some other not-so-small libraries. The current way manage my projects: I have pyenv and pyenv-virtualenv installed. I have a few (currently 4) specific virtualenvs that each cater to a type of project. The projects themselves have .pyenv-version set, I have the autoload virtualenv feature of pyenv enabled. If I need to share a project, I generate a requirements