O
O
Onefurniture2018-06-10 20:35:56
Python
Onefurniture, 2018-06-10 20:35:56

How to install pipenv on a clean lubuntu system (based on ubuntu 18.04)?

tell me how to install pipenv in lubuntu? The system is clean - I did not install anything at all on my own. It is pipenv that is needed, because I heard that the tool is quite advanced. the previous self-installation broke something in the system - I had to reinstall it. .. at a minimum, Python 3 + Django + Vue + bootstrap will be needed and I would like to install them in a virtual environment. I also experienced difficulties with the differences between pip install, pip install --user, pip3 install, sudo pip3 install some libraries were not installed by one command, but another was installed and it turns out that I install at random and it is not always clear what and why does not work (( (

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Aleksey Solovyev, 2018-06-10
@Onefurniture

Why don't you like the official documentation ?
Or via the repository:

sudo apt install software-properties-common python-software-properties
sudo add-apt-repository ppa:pypa/ppa
sudo apt update
sudo apt install pipenv

pip install --user differs from pip install in the installation location.
If pip install installs /usr/local/lib/python3.4 somewhere here, then pip install --user to your home directory ( ~/.local/ ). Therefore, pip install will (possibly) need superuser rights - sudo pip install
pip3 is used to install packages for different versions of python (2 - 3)
Ubuntu (and others like them) have versions 2, 2.7, 3, 3.5 installed out of the box
Therefore, if we want to use python3.*, then we need to use pip3 to install packages, and for python2.* - pip
It is worth noting that the pip installation for each version of python is different:
sudo apt install python3-pip 
sudo apt install python-pip

ps all the information is on the off site or use the command man or --help where we read:
--user Install to the Python user install directory for your platform. Typically ~/.local/, or %APPDATA%\Python on
Windows. (See the Python documentation for site.USER_BASE for full details.)

psps I don’t know why you chose pipenv, if you can use virtualenv, which is more popular, easier for a beginner:
sudo apt-get update && sudo apt-get -y upgrade
sudo apt-get install python3
sudo apt-get install -y python3-pip
pip3 install virtualenv

mkdir django-apps
cd django-apps 
virtualenv env
. env/bin/activate

(env) [email protected]:$ pip install django
(env) [email protected]:$ django-admin --version

(env) [email protected]:$ django-admin startproject app

Django installed.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question