Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    ashwinvis
    @ashwinvis:matrix.org
    [m]
    alexbc42: You need pyenv-virtualenv
    Fredrik Averpil
    @fredrikaverpil

    I have a weird problem. I have a Ubuntu 20.04.3 LTS Live USB and when running it, I cannot install llvm and tk-dev. They are simply not available. I posted an issue here about it: pyenv/pyenv#2076

    Does anyone have any clue as to why I cannot download these two packages?
    In the past, I've downloaded and installed these just fine.

    Sanket Dasgupta
    @SanketDG

    Man, I hve been using pyenv for so long, I never thought it would break.

    My pyenv activate does everything (sets $VIRTUAL_ENV etc) but fails to set the $PATH any ideas?

    Stefan Ulbrich
    @StefanUlbrich
    Hi, I installed pyenv yesterday on ubuntu 21.04 (zsh+ OhMyZsh) and everything went fine. When I restarted the PYENV_VERSION variable is always set for each shell (to anaconda) and the local .python-version is ignored. I want anaconda only for jupyter and more recent python versions for development .. I can put an unset PYTHON_VERSION in the rc file but I really wonder where the variable gets set and why
    Also how comes that path and this variable persists even if I remove all traces of pyenv until I restart (log out+in won't do the job)
    sandipanpanda
    @sandipanpanda
    Hi there, I want to help with pyenv/pyenv#1527 of pyenv. Can anyone direct me to where to discuss with project maintainers about the style and wordings before making PRs.
    Daniel Shapero
    @danshapero
    Having this annoying problem on MacOS Big Sur. I'll fire up a terminal session, do pyenv shell <some python version>, run some code, then go make coffee. When I come back, the machine has gone to sleep, but when I awaken it's as if all the environment variables have been clobbered.
    For example, if I do pyenv shell 3.9.7, then a suspend/resume cycle, then do pyenv version, I get 3.9.7 as the output, but then when I run python3 --version it's clearly picking up my system python (3.8.9).
    Vadym Khodak
    @vadymkhodak:matrix.org
    [m]

    Hi all,
    I have a problem that I can't solve for a long time.
    I have installed pyenv-2.2.0 with pyenv-virtualenv.
    I have installed them using this instruction https://github.com/pyenv/pyenv-installer.

    But it doesn't work properly on my side.
    I have a base python 3.8.8.
    I installed python 3.9.7 using this command pyenv install 3.9.7
    I created virtualenv using this command pyenv virtualenv 3.9.7 test
    I activate virtualenv using this command pyenv activate test
    But python version in my terminal is still 3.8.8

    Is here anyone who can help me?

    Felipe Ramos Kafuri
    @felipekafuri
    Screen Shot 2021-11-25 at 10.05.07.png
    Sup guys, I'm with a little problem over here. So I'm trying to use pyenv on my M1 Mac but when I'm going to download a certain python version it returns this exactly
    Can anyone help me with that? I started on python now, came from node, a friend of mine recommended me pyenv, cause I used to use nvm for node. But I'm struggling with this error
    tamaroth
    @tamaroth
    Hi, is it me or does pyenv virtualenv-delete -f <non-existing-venv> still displays error message and sets return error code to 1? I was under the impression that it should be silent, really. At least that's what the help says.
    tamaroth
    @tamaroth
    To answer my own question, I can use pyenv uninstall -f <non-existing-venv> and it will be working fine. The bug is quite old it seems: pyenv/pyenv-virtualenv#369
    mpmat
    @mpmat

    Hopefully someone can help me out here.

    MacBook Pro (Retina, 15-inch, Mid 2015)
    Processor 2.8 GHz Quad-Core Intel Core i7
    macOS Monterrey - 12.0.1 (21A559)

    I've successfully installed pyenv 2.2.0 (both via download and via brew, same problem either way

    √ ~ % pyenv --version
    pyenv 2.2.2
    √ ~ %

    I can confirm the current version of python:

    √ ~ % pyenv version
    system (set by /Users/xxxx/.pyenv/version)
    √ ~ %

    However, when I try to run pyenv install --list I get the following error:

    √ ~ % pyenv install --list
    Available versions:
    /Users/xxxx/.pyenv/plugins/python-build/bin/python-build: line 1957: /usr/local/bin/ls: Bad CPU type in executable
    /Users/xxxx/.pyenv/plugins/python-build/bin/python-build: line 1957: /usr/local/bin/ls: Bad CPU type in executable
    √ ~ %

    Things I've already tried:

    • Update OS
    • install pyenv via homebrew
    • Uninstall and re-install pyenv (both from download and via brew)
    • Uninstall homebrew and reinstall homebrew
    • brew upgrade pyenv
    • uninstall and re-install XCode CLI
    • about 600 other things that I found on the internet.....

    I'm a bit at my wits end (as had no such problems on my other MacBook)

    Anyone have any ideas?

    mpmat
    @mpmat
    For anyone interested... Finally found the issue. Had old ppc versions of command line tools installed in /usr/local/bin. Took forever to track down.
    Peyton Murray
    @peytondmurray
    Hey all, I've installed some programs using my system's package manager that I want to run with my system version of python. Is there any way I can automatically set them to use the system version of python besides using PYENV_VERSION and similar? What I'm imagining is having a mapping between programs and the version of python I want to use for each one which exists as part of my pyenv configuration, e.g.
    # command        version
    autotiling            system
    ...

    So far I've been using a setting in my .bashrc which clobbers the call to the program that I want to run, like this:

    autotiling() {
        PYENV_VERSION=system command autotiling
    }

    but this seems really impractical as a way of always running specific programs with specific python versions...

    SimAST-GCN
    @SimAST-GCN

    Hi, i have some problems, the problem is a little like the pyenv/pyenv#268.

    I can use the pyenv local to change the version. However, the version of the python dosen't change.

    I do the following cmmand.

    System python version : 3.9.7
    which python : /data/anaconda3/bin//python

    pyenv install 3.8.12
    pyenv virtualenv 3.8.12 py38
    pyenv local py38

    then, the (py38) is activated.

    but,

    python --version : 3.9.7

    I do not know why...

    Tymoteusz Stępień
    @403-html
    Hi, I'm having issue with setting right version of python. I can't use python 3.10.2, why - it's already in version file.
    It's how my config looks like, how to make it work? I'm on Mac with M1 chip if it's something needed.
    [~/.pyenv]$ python --version
    Python 2.7.18
    [~/.pyenv]$ python3 --version
    Python 3.9.10
    [~/.pyenv]$ pwd
    /Users/[userName]/.pyenv
    [~/.pyenv]$ cat version
    3.10.2
    [~/.pyenv]$ pyenv version
    3.10.2 (set by /Users/[userName]/.pyenv/version)
    beyondevil
    @beyondevil:matrix.org
    [m]
    Can someone help me troubleshoot why I'm getting /Users/user/.config/zsh/.zprofile:1: command not found: pyenv
    The line in the .zprofile file is eval "$(pyenv init --path)"
    whence -p pyenv gives me /opt/homebrew/bin/pyenv
    pyenv --version gives me pyenv 2.2.4
    Machine is a Mac M1 Pro with Monterey 12.1
    beyondevil
    @beyondevil:matrix.org
    [m]
    Fixed it. Had the eval... before setting the path
    Tom Purl (he/him)
    @tompurl:destrocodpiece.wtf
    [m]

    Hello! I've been having the following problem with pyenv since I updated it about a week ago. Whenever I try to install a new python I get this:

    ➜ pyenv install 3.7.10
    Downloading Python-3.7.10.tar.xz...
    -> https://www.python.org/ftp/python/3.7.10/Python-3.7.10.tar.xz
    /home/tom/.pyenv/plugins/python-build/bin/python-build: line 240: pushd: Python-3.7.10: No such file or directory
    
    BUILD FAILED (Ubuntu 20.04 using python-build 20180424)
    
    /home/tom/.pyenv/plugins/python-build/bin/python-build: line 151: [: 67760 /tmp/python-build.20220216112925.12260.log: integer expression expected

    I have re-installed pyenv multiple times by deleting my ~/.pyenv dir and running the curl https://pyenv.run | bash command. Here's the contents of my .bashrc file:

    eval "$(pyenv init --path)"
    
    export PYENV_ROOT="$HOME/.pyenv"
    export PATH="$PYENV_ROOT/bin:$PATH"
    1 reply
    Tom Purl (he/him)
    @tompurl:destrocodpiece.wtf
    [m]
    Ahh, ok. I tried the -v installation flag and what seems to be binary output is being sent to stdout. I captured that output and it's about 17 MB, which is the same size as a xz-compressed Python installation file. So why on earth is that being printed to STDOUT?
    adam-rightfoot
    @adam-rightfoot

    OK, before I try writing a full-fledged bug report:

    I'm on an Intel Mac, and just upgraded to MacOS 12.3. When I run

    pyenv install 3.9.7

    , I get this:

    pyenv install 3.9.7
    python-build: use openssl@1.1 from homebrew
    python-build: use readline from homebrew
    Downloading Python-3.9.7.tar.xz...
    -> https://www.python.org/ftp/python/3.9.7/Python-3.9.7.tar.xz
    Installing Python-3.9.7...
    python-build: use readline from homebrew
    python-build: use zlib from xcode sdk
    
    BUILD FAILED (OS X 12.3 using python-build 20180424)
    
    Inspect or clean up the working tree at /var/folders/mq/y0cf85gx28q77cjk3dwbm0cm0000gn/T/python-build.20220317102745.46488
    Results logged to /var/folders/mq/y0cf85gx28q77cjk3dwbm0cm0000gn/T/python-build.20220317102745.46488.log
    
    Last 10 log lines:
    checking for --with-cxx-main=<compiler>... no
    checking for clang++... no
    configure:
    
      By default, distutils will build C++ extension modules with "clang++".
      If this is not intended, then set CXX on the configure command line.
    
    checking for the platform triplet based on compiler characteristics... darwin
    configure: error: internal configure error for the platform triplet, please file a bug report
    make: *** No targets specified and no makefile found.  Stop.

    Anything I can do fix this?

    Scott Brooks
    @scottamplitude
    @adam-rightfoot I'm having a similar issue on MacOS 12.2.1 (Monterey) on M1 installing 3.9.2. I saw this issue: pyenv/pyenv#2143, but none of the work arounds seem to address the issue. Have you had any luck?
    Kentaro0919
    @kentaro0919

    Hi all,

    I am using 3.6.3, and I could not install python 3.6.3 to macos 12.3. After some search the same issue was fix on cpython in bpo-45405-Prevent-internal-configure-error-when-runn.patch and in pyen in #2288

    I did copy plugins/python-build/share/python-build/patches/3.6.15 to 3.6.3, and renamed the sub folder to Python-3.6.3 from Python-3.6.15.

    I was able to install 3.6.3 .

    I guess for all python versions pyenv needs this fix, but there are so many versions.

    Is it any good idea to fix this?

    NakhyunKim1987
    @NakhyunKim1987

    Hello, 3.8.12 version will not be installed.
    I know that there are many people who have experienced the same problem as me.
    I'd appreciate it if you could give me a tip.

    MacBook Pro (15-inch, 2018)
    Processor 2.6 GHz 6Core Intel Core i7
    macOS Monterrey - 12.3.1


    pyenv install 3.8.12
    python-build: use openssl@1.1 from homebrew
    python-build: use readline from homebrew
    Installing Python-3.8.12...
    python-build: use tcl-tk from homebrew
    python-build: use readline from homebrew
    python-build: use zlib from xcode sdk

    BUILD FAILED (OS X 12.3.1 using python-build 20180424)

    Inspect or clean up the working tree at /var/folders/lt/xm7kbrzs0r388jvmc_z5z5bm0000gn/T/python-build.20220510190650.11062
    Results logged to /var/folders/lt/xm7kbrzs0r388jvmc_z5z5bm0000gn/T/python-build.20220510190650.11062.log

    Last 10 log lines:
    checking for --with-cxx-main=<compiler>... no
    checking for clang++... no
    configure:

    By default, distutils will build C++ extension modules with "clang++".
    If this is not intended, then set CXX on the configure command line.

    checking for the platform triplet based on compiler characteristics... darwin
    configure: error: internal configure error for the platform triplet, please file a bug report
    make: *** No targets specified and no makefile found. Stop.

    CC=`which gcc-11` pyenv install 3.8.12
    python-build: use openssl@1.1 from homebrew
    python-build: use readline from homebrew
    Installing Python-3.8.12...
    python-build: use tcl-tk from homebrew
    python-build: use readline from homebrew
    python-build: use zlib from xcode sdk

    BUILD FAILED (OS X 12.3.1 using python-build 20180424)

    Inspect or clean up the working tree at /var/folders/lt/xm7kbrzs0r388jvmc_z5z5bm0000gn/T/python-build.20220510184325.84068
    Results logged to /var/folders/lt/xm7kbrzs0r388jvmc_z5z5bm0000gn/T/python-build.20220510184325.84068.log

    Last 10 log lines:
    328 | #if !_PTHREAD_SWIFT_IMPORTER_NULLABILITY_COMPAT
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/pthread.h:328:6: warning: this use of "defined" may not be portable [-Wexpansion-to-defined]
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/pthread.h:537:6: warning: this use of "defined" may not be portable [-Wexpansion-to-defined]
    537 | #if !_PTHREAD_SWIFT_IMPORTER_NULLABILITY_COMPAT
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/pthread.h:537:6: warning: this use of "defined" may not be portable [-Wexpansion-to-defined]
    cc1: some warnings being treated as errors
    make: *** [Objects/floatobject.o] Error 1
    make: *** Waiting for unfinished jobs....

    Julian Hossbach
    @jhossbach
    Hey all, I am working with a project that uses the cmake option find_package(PythonInterp 3.8 REQUIRED). Now the problem is that it will search for python3.8 explicitly but pyenv will complain that 3.8 cannot be found and lists some versions that are there, such as 3.8.13 which I installed explicitly for that.Is there any way to point pyenv to point to 3.8.13 when trying to execute python3.8?
    purwahire
    @purwahire
    Hi
    Eric
    @eric-g-97477
    When I use pyenv global <python_version>, I end up with a $PATH that looks like /Users/eric/.pyenv/versions/3.10.4/bin:/Users/eric/.pyenv/shims which means that if I try to use pyenv local <version> in a directory, the local version is ignored in favor of the global version because of how the $PATH is setup. I am not sure how to get the local version recognized. What I am doing wrong?
    Eric
    @eric-g-97477
    nevermind. I traced the problem to using load_nvm (setting up what is pyenv for javacript/node stuff) ... it apparently wants to modify the path and insert what I would assume is the system python version.
    anonymous_meerkat
    @anonymous_meerkat:matrix.org
    [m]
    hey - I'm trying out pyenv, and running into issues
    one big difference from what I'm reading in the README could be that I'm root over here
    root in ~
    ➜ pyenv install 3.10.6
    Downloading Python-3.10.6.tar.xz...
    -> https://www.python.org/ftp/python/3.10.6/Python-3.10.6.tar.xz
    Installing Python-3.10.6...
    
    BUILD FAILED (Debian 11 using python-build 20180424)
    
    Inspect or clean up the working tree at /tmp/python-build.20220821113258.222127
    Results logged to /tmp/python-build.20220821113258.222127.log
    
    Last 10 log lines:
      File "/tmp/python-build.20220821113258.222127/Python-3.10.6/Lib/ensurepip/__init__.py", line 287, in _main
        return _bootstrap(
      File "/tmp/python-build.20220821113258.222127/Python-3.10.6/Lib/ensurepip/__init__.py", line 203, in _bootstrap
        return _run_pip([*args, *_PACKAGE_NAMES], additional_paths)
      File "/tmp/python-build.20220821113258.222127/Python-3.10.6/Lib/ensurepip/__init__.py", line 104, in _run_pip
        return subprocess.run(cmd, check=True).returncode
      File "/tmp/python-build.20220821113258.222127/Python-3.10.6/Lib/subprocess.py", line 524, in run
        raise CalledProcessError(retcode, process.args,
    subprocess.CalledProcessError: Command '['/tmp/python-build.20220821113258.222127/Python-3.10.6/python', '-W', 'ignore::DeprecationWarning', '-c', '\nimport runpy\nimport sys\nsys.path = [\'/tmp/tmphf_1rhps/setuptools-63.2.0-py3-none-any.whl\', \'/tmp/tmphf_1rhps/pip-22.2.1-py3-none-any.whl\'] + sys.path\nsys.argv[1:] = [\'install\', \'--no-cache-dir\', \'--no-index\', \'--find-links\', \'/tmp/tmphf_1rhps\', \'--root\', \'/\', \'--upgrade\', \'setuptools\', \'pip\']\nrunpy.run_module("pip", run_name="__main__", alter_sys=True)\n']' returned non-zero exit status 1.
    make: *** [Makefile:1280: install] Error 1
    that's the trace from the last attempt at installing
    I'm running with zsh as my primary shell, I've dropped the lines from the README in .zshrc, .zprofile, even .bashrc and .profile just in case it helps somehow
    anonymous_meerkat
    @anonymous_meerkat:matrix.org
    [m]
    if anyone sees this, it was dependency issues
    Neal McBurnett
    @nealmcb
    Hi, and thanks for pyenv!
    I have the same experience as pyenv/pyenv#1675 ("pyenv local mechanism not working in Jupyter terminal")
    That was closed for lack of response.
    But based on the existence of aiguofer/pyenv-jupyter-kernel: Pyenv plugin to create a jupyter kernel for every installed pyenv version I wonder if stock pyenv even supports what they (and I) are asking for.
    Neal McBurnett
    @nealmcb
    I just updated the issue, which I dare say should be reopened or turned into a feature request.
    aymericDD
    @aymericDD

    Hi - I'm trying to install python 3.9.9 with pyenv and I encouter this issue :

    ➜ pyenv install 3.9.9 --skip-existing
    python-build: use openssl@1.1 from homebrew
    python-build: use readline from homebrew
    Downloading Python-3.9.9.tar.xz...
    -> https://www.python.org/ftp/python/3.9.9/Python-3.9.9.tar.xz
    Installing Python-3.9.9...
    python-build: use tcl-tk from homebrew
    python-build: use readline from homebrew
    python-build: use zlib from xcode sdk
    
    BUILD FAILED (OS X 12.6 using python-build 20180424)
    
    Inspect or clean up the working tree at /var/folders/9c/sdytdkvx69jfptwzt69xv8s40000gp/T/python-build.20221011175145.8999
    Results logged to /var/folders/9c/sdytdkvx69jfptwzt69xv8s40000gp/T/python-build.20221011175145.8999.log
    
    Last 10 log lines:
      File "/private/var/folders/9c/sdytdkvx69jfptwzt69xv8s40000gp/T/python-build.20221011175145.8999/Python-3.9.9/Lib/runpy.py", line 111, in _get_module_details
        __import__(pkg_name)
      File "/private/var/folders/9c/sdytdkvx69jfptwzt69xv8s40000gp/T/python-build.20221011175145.8999/Python-3.9.9/Lib/ensurepip/__init__.py", line 5, in <module>
        import tempfile
      File "/private/var/folders/9c/sdytdkvx69jfptwzt69xv8s40000gp/T/python-build.20221011175145.8999/Python-3.9.9/Lib/tempfile.py", line 45, in <module>
        from random import Random as _Random
      File "/private/var/folders/9c/sdytdkvx69jfptwzt69xv8s40000gp/T/python-build.20221011175145.8999/Python-3.9.9/Lib/random.py", line 49, in <module>
        from math import log as _log, exp as _exp, pi as _pi, e as _e, ceil as _ceil
    ModuleNotFoundError: No module named 'math'
    make: *** [install] Error 1

    MacoOS : Darwin COMP-KVHFMX77TC 21.6.0 Darwin Kernel Version 21.6.0: Mon Aug 22 20:19:52 PDT 2022; root:xnu-8020.140.49~2/RELEASE_ARM64_T6000 arm64 arm Darwin

    aymericDD
    @aymericDD
    Any help? :angel:
    Stefano Masini
    @stefanomasini
    Hi all, trying to install python 3.9.4 on MacOSX Monterey 12.4, running on M1 Apple Silicon. It ends up like this:
    cc1: some warnings being treated as errors
    make: *** [Objects/floatobject.o] Error 1
    make: *** Waiting for unfinished jobs....
    In file included from ./Include/pythread.h:128,
                     from ./Include/Python.h:136,
                     from Objects/methodobject.c:4:
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/pthread.h:328:6: warning: this use of "defined" may not be portable [-Wexpansion-to-defined]
      328 | #if !_PTHREAD_SWIFT_IMPORTER_NULLABILITY_COMPAT
          |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/pthread.h:328:6: warning: this use of "defined" may not be portable [-Wexpansion-to-defined]
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/pthread.h:537:6: warning: this use of "defined" may not be portable [-Wexpansion-to-defined]
      537 | #if !_PTHREAD_SWIFT_IMPORTER_NULLABILITY_COMPAT
          |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/pthread.h:537:6: warning: this use of "defined" may not be portable [-Wexpansion-to-defined]
    
    BUILD FAILED (OS X 12.4 using python-build 20180424)
    I went through all sorts of tutorials and installed/updated lots of packages in homebrew, but I still fail to see what might be wrong. I can't seem to find any similar issue out there. Any idea of what it could be, how I could debug further?
    Carl Dong
    @dongcarl
    I'm seeing that $PYENV_ROOT/bin doesn't exist on my machine, so fish_add_path $PYENV_ROOT/bin fails, does this indicate that my setup is incorrect?