Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #222061 > unrolled thread

python virualenv

Started byRainer Dorsch <ml@bokomoko.de>
First post2020-04-28 23:30 +0200
Last post2020-05-01 22:10 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.debian.user


Contents

  python virualenv Rainer Dorsch <ml@bokomoko.de> - 2020-04-28 23:30 +0200
    Re: python virualenv Tom Low-Shang <tom@lowshang.com> - 2020-04-29 03:10 +0200
      Re: python virualenv Rainer Dorsch <ml@bokomoko.de> - 2020-05-01 22:10 +0200

#222061 — python virualenv

FromRainer Dorsch <ml@bokomoko.de>
Date2020-04-28 23:30 +0200
Subjectpython virualenv
Message-ID<A0FXI-8qB-5@gated-at.bofh.it>
Hello,

I have a quite basic questions on virtualenv for python/pip:

If I run it as shown in the example below, I see that binaries which come with 
pip installed packages in a virtualenv go into the ~/.local/bin directory and 
not into the <virtualenv>/bin directory.  E.g. shown here

 The script plasma_store is installed in '/home/rd/.local/bin' which is not on 
PATH. 
 Consider adding this directory to PATH or, if you prefer to suppress this 
warning, use --no-warn-script-location.                                                                                                                                                                                   

I am just wondering if there is a good reason for that. If all the effort is 
already done, why not storing all parts in virtualenv environment?

Here is the full sequence I executed:

rd@h370:~/virtualenv$ virtualenv covidify 
Running virtualenv with interpreter /usr/bin/python2 
New python executable in /home/rd/virtualenv/covidify/bin/python2 
Also creating executable in /home/rd/virtualenv/covidify/bin/python 
Installing setuptools, pkg_resources, pip, wheel...done. 
rd@h370:~/virtualenv$ source covidify/bin/activate 
(covidify) rd@h370:~/virtualenv$ pip3 install covidify 
Collecting covidify 
 Downloading https://files.pythonhosted.org/packages/21/0a/
2e8e65ce15e3ab2786a55ff5191126aac02185c1a724a59d1abd04185178/covidify-1.2.0-
py2.py3-none-any.whl 
Requirement already satisfied: GitPython in /usr/lib/python3/dist-packages 
(from covidify) (2.1.11) 
Requirement already satisfied: xlsxwriter in /usr/lib/python3/dist-packages 
(from covidify) (1.1.2) 
Requirement already satisfied: docopt in /usr/lib/python3/dist-packages (from 
covidify) (0.6.2) 
Requirement already satisfied: click in /usr/lib/python3/dist-packages (from 
covidify) (7.0) 
Requirement already satisfied: matplotlib in /usr/lib/python3/dist-packages 
(from covidify) (3.0.2) 
Collecting pyarrow (from covidify) 
 Downloading https://files.pythonhosted.org/packages/d6/85/
a763edd24d0e70261726dda48818e2723d9b09cd3c05c238a8f39e7dcfd8/pyarrow-0.17.0-
cp37-cp37m-manylinux1_x86_64.whl (64.5MB) 
   100% |████████████████████████████████| 64.5MB 19kB/s  
Requirement already satisfied: pillow in /usr/lib/python3/dist-packages (from 
covidify) (5.4.1) 
Requirement already satisfied: tqdm in /usr/lib/python3/dist-packages (from 
covidify) (4.28.1) 
Requirement already satisfied: pandas in /usr/lib/python3/dist-packages (from 
covidify) (0.23.3+dfsg) 
Requirement already satisfied: numpy in /usr/lib/python3/dist-packages (from 
covidify) (1.16.2) 
Installing collected packages: pyarrow, covidify 
 The script plasma_store is installed in '/home/rd/.local/bin' which is not on 
PATH. 
 Consider adding this directory to PATH or, if you prefer to suppress this 
warning, use --no-warn-script-location.                                                                                                                                                                                   
 The script covidify is installed in '/home/rd/.local/bin' which is not on 
PATH. 
 Consider adding this directory to PATH or, if you prefer to suppress this 
warning, use --no-warn-script-location.                                                                                                                                                                                   
Successfully installed covidify-1.2.0 pyarrow-0.17.0 
(covidify) rd@h370:~/virtualenv$

Many thanks
Rainer

-- 
Rainer Dorsch
http://bokomoko.de/

[toc] | [next] | [standalone]


#222065

FromTom Low-Shang <tom@lowshang.com>
Date2020-04-29 03:10 +0200
Message-ID<A0JoB-2bq-3@gated-at.bofh.it>
In reply to#222061
On Tue, Apr 28, 2020 at 11:20:04PM +0200, Rainer Dorsch wrote:
> Here is the full sequence I executed:
> 
> rd@h370:~/virtualenv$ virtualenv covidify 
> Running virtualenv with interpreter /usr/bin/python2 

Virtualenv uses python2

> New python executable in /home/rd/virtualenv/covidify/bin/python2 Also 
> Also creating executable in /home/rd/virtualenv/covidify/bin/python 
> Installing setuptools, pkg_resources, pip, wheel...done. 
> rd@h370:~/virtualenv$ source covidify/bin/activate 
> (covidify) rd@h370:~/virtualenv$ pip3 install covidify 

Pip3 uses python3 which is outside the virtualenv.

Either run pip, or create the virtualenv with python3, which will 
install pip3.


-- 
Tom Low-Shang

[toc] | [prev] | [next] | [standalone]


#222173

FromRainer Dorsch <ml@bokomoko.de>
Date2020-05-01 22:10 +0200
Message-ID<A1K8V-8tI-13@gated-at.bofh.it>
In reply to#222065
Am Mittwoch, 29. April 2020, 02:54:04 CEST schrieb Tom Low-Shang:
> On Tue, Apr 28, 2020 at 11:20:04PM +0200, Rainer Dorsch wrote:
> > Here is the full sequence I executed:
> > 
> > rd@h370:~/virtualenv$ virtualenv covidify
> > Running virtualenv with interpreter /usr/bin/python2
> 
> Virtualenv uses python2
> 
> > New python executable in /home/rd/virtualenv/covidify/bin/python2 Also
> > Also creating executable in /home/rd/virtualenv/covidify/bin/python
> > Installing setuptools, pkg_resources, pip, wheel...done.
> > rd@h370:~/virtualenv$ source covidify/bin/activate
> > (covidify) rd@h370:~/virtualenv$ pip3 install covidify
> 
> Pip3 uses python3 which is outside the virtualenv.
> 
> Either run pip, or create the virtualenv with python3, which will
> install pip3.

Many thanks, Tom.

virtualenv -p python3 covidify

indeed solved the issue.

Rainer

-- 
Rainer Dorsch
http://bokomoko.de/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web