which
command just confuses the hell out of me, which makes me assume it's not completely working
Hi all. I'm trying to downgrade sqlite3.sqlite_version for Python 3.4 to run some tox tests, and am having no luck. I'm on Ubuntu 20.04. I was able to successfully upgrade it to 3.32.1 with:
PYTHON_CONFIGURE_OPTS="LD_RUN_PATH=/home/linuxbrew/.linuxbrew/Cellar/sqlite/3.32.1/lib LDFLAGS=-L/home/linuxbrew/.linuxbrew/Cellar/sqlite/3.32.1/lib CPPFLAGS=-I/home/linuxbrew/.linuxbrew/include" pyenv install 3.4.8
When I try to install an old formula for 3.25 or 3.24, I always wind up with 3.31.1 (the Ubuntu system version of libsqlite3-dev). I can't downgrade libsqlite3-dev since it's a dependency for a bunch of other system packages. I'm assuming it's my poor understanding of the flags I'm attempting to pass to the compilation process, but I don't know for sure.
If I drop the CPPFLAGS variable altogether, I'm able to get it to not compile _sqlite3 at all, but when I point it to the value from snippet above, or to /include in separately compiled sqlite3 3.25/3.24, or any of the other combinations I've tried, I still end up with 3.31.1.
Thanks in advance for any light you can shed on this, even if it's just pointing to helpful resources.
Hello everybody! I'm installing Python 3.8.3 on centos 3.10.0-957.27.2.el7.x86_6 but it fails to import readline. This is a shared compute cluster where I can't run a package installer or sudo. The key build message is:
*** WARNING: renaming "readline" since importing it failed: /home/groups/blah.../lib/libreadline.so.8: undefined symbol: UP
The 3rd and 4th repetitions of that warning in the build log, it's followed with:
INFO: Could not locate ffi libs and/or headers
and stuff I don't understand about "necessary bits to build these optional modules".
The build command looks like
CFLAGS="-I/home/groups/blah.../include -I/share/software/user/open/sqlite/3.18.0/include" \
LDFLAGS="-L/home/groups/blah.../lib -L/home/groups/blah.../lib64" \
LD_LIBRARY_PATH="/home/groups/blah.../lib:/home/groups/blah.../lib64:$LD_LIBRARY_PATH" \
SSH=/home/groups/blah... \
CONFIGURE_OPTS="--enable-optimizations" \
PYTHON_CONFIGURE_OPTS="--enable-shared" \
pyenv install -f -v 3.8.3
This is after compiling libressl, readline, and libffi from source and installing them into that blah...
directory.
Any suggestions? TIA!
if I am using macos and installed pyenv with brew, do I need to set PYENV_ROOT, when I am in nvim and do :checkhealth it says that peen_root is not set.
I know documentatioan says when installing with home-brew, starting with #3 ("Add pyenv init to your shell) but that doesn’t set the ROOT_PYENV.
BUILD FAILED
message and pyenv global {the-version}
says that it's not installed, however the build log says that Python build finished successfully!
and that it performed the installation and also installed the setuptools. What can be the reason of the error message and of the build being invisible to pyenv
? The complete build log is here: http://sprunge.us/2XBBe0
python -c "import ssl; print(ssl.OPENSSL_VERSION)"
CFLAGS="-I/usr/local/ssl/include"
LDFLAGS="-L/usr/local/ssl/lib"
pyenv install -v 3.6.2
root@47d430be99fa:~/Projects# openssl version -a
OpenSSL 1.0.2g 1 Mar 2016
built on: reproducible build, date unspecified
platform: linux-x86_64
options: bn(64,64) rc4(16x,int) des(idx,cisc,16,int) idea(int) blowfish(idx)
compiler: gcc -I. -I.. -I../include -fPIC -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -Wa,--noexecstack -m64 -DL_ENDIAN -O3 -Wall -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM -DECP_NISTZ256_ASM
OPENSSLDIR: "/usr/local/ssl"
$ pyenv --version
pyenv 1.2.19-6-gbdfed51
pyenv local 2.7.18
), I'm getting pyenv: version 'x.x.x' not installed
: theia@51a0efa33dd1:/home/project$ ls -l /home/theia/.pyenv/versions/
total 24
drwxr-xr-x 1 theia theia 4096 Aug 6 11:49 2.7.18
drwxr-xr-x 1 theia theia 4096 Aug 6 11:50 3.5.9
drwxr-xr-x 1 theia theia 4096 Aug 6 11:50 3.6.11
drwxr-xr-x 1 theia theia 4096 Aug 6 11:50 3.7.8
drwxr-xr-x 1 theia theia 4096 Aug 6 11:50 3.8.5
drwxr-xr-x 1 theia theia 4096 Aug 6 11:51 3.9-dev
theia@51a0efa33dd1:/home/project$ ls -l /home/theia/.pyenv/versions/2.7.18/
total 20
drwxr-xr-x 1 theia theia 4096 Aug 6 11:52 bin
drwxr-xr-x 1 theia theia 4096 Aug 6 11:21 include
drwxr-xr-x 1 theia theia 4096 Aug 6 11:21 lib
drwxr-xr-x 1 theia theia 4096 Aug 6 11:49 man
drwxr-xr-x 1 theia theia 4096 Aug 6 11:21 share
theia@51a0efa33dd1:/home/project$ pyenv local 2.7.18
pyenv: version `2.7.18' not installed
It seems the issue was that tab completion in the shell was replacing ~
with /~
, e.g.
theia@6c1a368dc9db:/home/project$ ls \~
Putting the full path to the .pyenv folder in my .bashrc seems to have fixed it.
From:
echo 'export PYENV_ROOT="~/.pyenv"' >> ~/.bashrc
To
echo 'export PYENV_ROOT="/home/theia/.pyenv"' >> ~/.bashrc
❯ pyenv install -vvv pypy3.6-7.3.1
/var/folders/dl/f3h10k2x10l88zy9wdjtbd600000gn/T/python-build.20200908191719.97207 ~/PycharmProjects/typic
Downloading pypy3.6-v7.3.1-osx64.tar.bz2...
-> https://bitbucket.org/pypy/pypy/downloads/pypy3.6-v7.3.1-osx64.tar.bz2
curl: (22) The requested URL returned error: 404
error: failed to download pypy3.6-v7.3.1-osx64.tar.bz2
BUILD FAILED (OS X 10.15.6 using 0000000000)
downloads.python.org
I imagine one way is to symlink the global version into the user pyenv dir
Yeah, that's what I've been doing, or just moving them entirely to the user's home directory. I'd like a more correct and automated way of doing it. As it is now, we will seriously clutter the PYENV_ROOT directory.
Hi. Is there a way to upgrade the pip version globally, so that new virtualenvs created use that version? I tried upgrading while having the python version used as base for the envs as global, but creating a venv after that still uses the old pip version.
There is a pyenv plugin that lets you set default installed modules, perhaps it might also upgrade those modules? I'm not sure.
pyenv install --list
(latest appears to be 3.9.0-dev
). Although I have been loving it so far, I am fairly new to pyenv so I still don't know how new versions become available, is there a PR that needs to happen? I am running the latest pyenv version. Thanks!
pip
using the system python, I get home/crater2150/.local/share/pyenv/pyenv.d/exec/pip-rehash/pip: /home/crater2150/.local/bin/pip: /usr/bin/python2: bad interpreter: No such file or directory
. Curiously, calling the python
shim works and starts my system python, and so do various other system commands that have a shim, only pip
seems broken.pyenv rehash
.
/usr/bin/python
is a symlink to python3
, there isn't any reference to python2 left in my /usr/bin
)