Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Jeremy Cantrell
    @jmcantrell
    I get "No module named pip" for python -m pip install
    Kal Sze
    @ksze
    pyenv versions are like base installations of Python. You should then use venv, virtualenvwrapper, pipenv, poetry, or the like to create your virtual environment.
    Have you properly initialized pyenv?
    Jeremy Cantrell
    @jmcantrell
    As far as I know. I followed the instructions, pyenv doctor gives the thumbs up, and I've been able to install and use versions.
    Weird. I don't get the not found error on a different version. Gonna reinstall 3.9.5.
    Kal Sze
    @ksze
    I think it's odd that pyenv which pip points you to ~/.local/bin/pip, which then contains #!/usr/bin/python
    Jeremy Cantrell
    @jmcantrell
    Definitely weird
    Kal Sze
    @ksze
    (because you're supposed to be using 3.9.5 from pyenv now)
    Angus Hollands
    @agoose77:matrix.org
    [m]
    Yes, that's what I'm confused about. I just re-installed pyenv to see whether it's a wierd artefact
    Jeremy Cantrell
    @jmcantrell
    And probably my fault. I'm just trying to figure out what I did wrong.
    Kal Sze
    @ksze
    pyenv which pip should have pointed you to $HOME/.pyenv/versions/3.9.5/bin/pip.
    Angus Hollands
    @agoose77:matrix.org
    [m]
    I wonder whether that is what happens when the installed Python doesn't have pip, i.e. the shim falls through to the system
    @jmcantrell: does $PYENV_ROOT/versions/3.9.5/bin/pip exist?
    Kal Sze
    @ksze
    @agoose77:matrix.org but 3.9.5 should come with pip already, no?
    Jeremy Cantrell
    @jmcantrell
    Shoot. I already uninstalled it to reinstall.
    Angus Hollands
    @agoose77:matrix.org
    [m]
    @ksze: absolutely, but sometimes pip can be missing in Python installations. It shouldn't be in pyenv though
    Jeremy Cantrell
    @jmcantrell
    ok, after reinstall, pyenv which pip reports the correct path.
    Is it best to avoid --user installs with pyenv's pip?
    Kal Sze
    @ksze
    I don't think you need --user there because the python version is effectively yours only.
    I myself never use --user with the pip from pyenv.
    Jeremy Cantrell
    @jmcantrell
    What's the best way to tell if a pyenv version is being used (not system)? Check the output of pyenv global?
    Kal Sze
    @ksze
    if you do which python or which pip and it points you to the pyenv shim.
    And then you check pyenv global and pyenv shell
    Jeremy Cantrell
    @jmcantrell
    Sorry, I should have added "programmatically".
    Kal Sze
    @ksze
    Probably something that involves making the python exec print its path and grepping for something in the path that hints at pyenv.
    e.g. grepping for .pyenv/versions/3.9.5/
    Jeremy Cantrell
    @jmcantrell
    Seems like if [[ "$(pyenv global)" == "system" ]]; then would be more robust.
    Kal Sze
    @ksze
    That should also work.
    I mean, it depends on whether you want to determine the python version from within the Python process/script or from a shell script.
    Jeremy Cantrell
    @jmcantrell
    Yeah, you're right. In this case, I just needed to know whether python was the system version or not.
    Eric Dostie
    @remd
    Hello. I'm seeking help with a hunk failure when patching setup.py when installing Python 2.6.6 via pyenv.
    https://pastebin.com/ug0kDxyM has details. I am ensuring that OpenSSL 1.0.x is being utilized during the install, but I'm not sure that my issue is with OpenSSL. it seems more like an issue with the patch that is being applied to setup.py.
    Eric Dostie
    @remd
    pyenv doctor is claiming that OpenSSL is not installed, but it clearly is. what gives? https://pastebin.com/VrzrUDvN
    Eric Dostie
    @remd
    I was able to get pyenv doctor to detect OpenSSL 1.1 successfully (https://pastebin.com/vVzAqj97), but still getting the hunk failure during the install.
    Isaac Ferreira Filho
    @yzakius

    Hello everyone. I'm install pyenv and pyenv-virtualenv following instructions in github.

    My problem: I can't access other python versions that I installed through pyenv. I installed version 3.6.9, but when I use pyenv-virtualenv or a "pyenv shell 3.6.9" I'm still on the same version as my system.

    StephenHogg
    @StephenHogg
    Hi - I've had a look around but aren't able to work out if there's a way to share packages between pyenv virtualenvs? I'm quite keen to avoid a situation where I have 5-10 different copies of torch (~800mb) installed
    would be very grateful for any guidance
    Angus Hollands
    @agoose77:matrix.org
    [m]
    @StephenHogg: not with pyenv + venv - the libraries themselves are installed in conventional Python virtualenvironments
    You can use something like conda, which uses hard-links to avoid duplicating packages (where the versions agree)
    Adam Janik
    @adam.k.janik:matrix.org
    [m]
    CFLAGS="-I$(brew --prefix openssl)/include -I$(brew --prefix readline)/include -I$(xcrun --show-sdk-path)/usr/include" LDFLAGS="-L$(brew --prefix openssl)/lib -L$(brew --prefix readline)/lib -L$(brew --prefix zlib)/lib" CPPFLAGS="-I$(brew --prefix zlib)/include" CONFIGURE_OPTS="--with-openssl=$(brew --prefix openssl)" pyenv install 3.9.1
    But it does not help. Reinstalled zlib, readline and openssl but still does not work on Macos 11.4
    I got no idea how to debug this
    alex-yobota
    @alex-yobota
    Hi - I need a hand installing python 3.6.9 on arch. I have successfully installed other versions, but less that 3.7 seems to fail. I have a build log, but it is ~10,000 lines. Is there a particular bit of it that would be helpful?
    Jeremy Cantrell
    @jmcantrell:matrix.org
    [m]
    I just noticed that there are no python, pip, etc symlinks in ~/.pyenv/shims to python3, pip3, etc. Shouldn't those exist? Direnv's pyenv integration looks for "python", so it breaks.
    Xavier Sumba
    @cuent
    hello, I am trying to install python 3.7.11 with pyenv in ubuntu 20 but it is failing due to OpenSSL. I am getting this message The Python ssl extension was not compiled. Missing the OpenSSL lib? I tried what it says in the common build problems guide but can't fix it. Any thoughts ?
    Xavier Sumba
    @cuent
    fixed after installing libssl-dev
    haoming-XU
    @haoming-XU
    pyenv will cause sh to become stuck due to the eval "$(pyenv virtualenv-init -)" in the configuration file
    Will produce a relatively large freeze
    haoming-XU
    @haoming-XU
    CentOS dependency yum install -y gcc zlib-devel bzip2-devel readline-devel openssl-devel sqlite-devel curl
    Ubuntu dependency sudo apt install -y gcc zlib1g-dev libbz2-dev libreadline-dev libssl-dev libsqlite3-dev curl