eval "$(pyenv init -)"
ยป pyenv install 3.8.2
Downloading Python-3.8.2.tar.xz...
-> https://www.python.org/ftp/python/3.8.2/Python-3.8.2.tar.xz
Installing Python-3.8.2...
BUILD FAILED (Arch Linux using python-build 20180424)
Inspect or clean up the working tree at /tmp/python-build.20200425123545.346823
Results logged to /tmp/python-build.20200425123545.346823.log
Last 10 log lines:
If you want a release build with all stable optimizations active (PGO, etc),
please run ./configure --enable-optimizations
gcc -pthread -c -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -I./Include/internal -I. -I./Include -I/home/rok/.pyenv/versions/3.8.2/include -I/home/rok/.pyenv/versions/3.8.2/include -DPy_BUILD_CORE -o Programs/python.o ./Programs/python.c
make: gcc: Permission denied
make: *** [Makefile:772: Programs/python.o] Error 127
make: *** Waiting for unfinished jobs....
I have been using pyenv
for managing python versions and virtual environments on my mac for some time now.
Recently I reinstalled pyenv
and since then on every pyenv
command I try to run, I get the following error
/usr/local/bin/pyenv:94: command not found: shopt
My default shell is the latest MacOS
's default shell i.e. zsh
.
On searching for the fix, I found out it has something to do with bash
interfering with the zsh
.
My default shell is zsh
in settings, the contents of ~/.bash_profile
, /etc/profile
& /etc/bashrc
are all commented out but I am still having the issue.
My OS Verion is: 10.15.4
.
I tried reinstalling pyenv
as well but I am getting the same error.
I am unable to run ANY pyenv
related command, can anyone please help? Is this a pyenv
issue?
@burakcank I switched to bash
as shopt
command was working in bash
, and I added
export PATH=/usr/local/bin:$PATH
as the first line in my ~/.bash_profile
, but I still got the same error. i.e.
/usr/local/bin/pyenv:94: command not found: shopt
As you can see it's not having trouble finding the pyenv
command, pyenv
command is there in /usr/loca/bin
and the terminal is picking it up from there from $PATH
, the problem is in pyenv
not being able to find the shopt
command it seems like, when shopt
command is there as I can see by running shopt
on the terminal.
which shopt
which failed for obvious reasons and came across with this.
It's interesting that pyenv is trying to use a built-in command for bash. Basically pyenv is not aware that you are using zsh instead of bash in the first place.
as I mentioned above, I am having this problem with bash
as well. I tried all of the above with bash
. I am using bash
, pyenv
should work with that at least. I don't understand why pyenv
is unable to find shopt
command (if it uses it) when I can easily see it in my bash
terminal)
I realized after running
which shopt
which failed for obvious reasons and came across with this.
instead of which shopt
, just do shopt
and you will see. Although that will only work in bash
terminal, as it's a bash
built-in command.
Okay @burakcank, zsh
it is then.
I restarted my mac as you said.
Here's the output of my $ echo $PATH
/usr/local/opt/openssl@1.1/bin:/Users/abc/Library/Python/3.7/bin:/usr/local/Cellar/postgresql@9.6/9.6.16/bin/:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/abc/bin:/usr/local/opt/rabbitmq/sbin
As you can see /usr/local/bin
is there which is the location of pyenv
. Still having the same problem.
Hi, I am a new pyenv user and got a bit stuck. I posted this (https://bit.ly/3dQjnpF) on stackoverflow but did not get a response. Maybe someone here could help me? Everything works fine until I try to activate the virtual environment, it then says
Failed to activate virtualenv.
Perhaps pyenv-virtualenv has not been loaded into your shell properly.
Please restart current shell and try again.
I think my problem is twofold. I changed from bash to zsh mid way and I think I managed to make a big mess of the zshrc file. It currently looks like I shared in StackOverflow.
Is this the place to ask this question?
Thanks!
When I try to install python using 'pyenv install 3.8.0" (I tried many versions, but lets go with python 3.8.0) it fails almost immediately and the only thing in my log is:
curl: (56) OpenSSL SSL_read: error:1408F119:SSL routines:ssl3_get_record:decryption failed or bad record mac, errno 0
Both OpenSSL and curl are up to date and I have everything installed that I would need to build python. Please let me know if there is any additional information that would be helpful. I have looked through the issues on the pyenv git page. I also asked the question on stack overflow, but have gotten no response. Does anyone have any thoughts or solution?
Thanks.