Home > Backend Development > Python Tutorial > Pyenv and Pipenv on Fedora

Pyenv and Pipenv on Fedora

王林
Release: 2024-07-19 13:06:42
Original
469 people have browsed it

Pyenv and Pipenv on Fedora

I wonder if I can use pyenv and pipenv on Fedora Workstation 40 although I don't use these utilities in my personal projects. And the answer is yes.

The steps are as follow:

Install dependencies

sudo dnf builddep python3
Copy after login

Install pyenv

curl https://pyenv.run | bash
Copy after login

I know that you don't like running Bash script immediately from cURL.

Modify .bashrc

Pyenv normally told you to append these lines to .bashrc, and the restart your terminal.

export PYENV_ROOT="$HOME/.pyenv"
[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"

# Restart your shell for the changes to take effect.

# Load pyenv-virtualenv automatically by adding
# the following to ~/.bashrc:

eval "$(pyenv virtualenv-init -)"
Copy after login

Install Python via Pyenv

pyenv install 3.10 # You can choose other versions
Copy after login

I know that we can install Python using configure and make like many other packages, but you can use pyenv as well.

Set default python

pyenv global 3.10 # or other version
Copy after login

And then restart your terminal.

And finally, install pipenv

pip install pipenv
Copy after login

The above is the detailed content of Pyenv and Pipenv on Fedora. For more information, please follow other related articles on the PHP Chinese website!

source:dev.to
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template