You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When installing packages as --editable, pip add their path to <prefix>/lib/python2.7/site-packages/easy-install.pth.
So installing multiple package means we get one line per package in that file.
However if a package path is listed in PYTHONPATH, that line in easy-install.pth is removed.
Is this expected ?
I had naively assumed that PYTHONPATH shouldn't affect how installing a packages can hide others, only how they are found...
What I've run:
alexv@AlexV-Linux:~$ mkdir tmptest
alexv@AlexV-Linux:~$ cd tmptest/
alexv@AlexV-Linux:~/tmptest$ git clone https://github.com/mitsuhiko/flask.git
Cloning into 'flask'...
remote: Counting objects: 12959, done.
remote: Total 12959 (delta 0), reused 0 (delta 0), pack-reused 12959
Receiving objects: 100% (12959/12959), 3.70 MiB | 2.02 MiB/s, done.
Resolving deltas: 100% (8957/8957), done.
Checking connectivity... done.
alexv@AlexV-Linux:~/tmptest$ git clone https://github.com/kennethreitz/requests
Cloning into 'requests'...
remote: Counting objects: 19087, done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 19087 (delta 0), reused 0 (delta 0), pack-reused 19083
Receiving objects: 100% (19087/19087), 7.89 MiB | 2.60 MiB/s, done.
Resolving deltas: 100% (12467/12467), done.
Checking connectivity... done.
alexv@AlexV-Linux:~/tmptest$ mkvirtualenv tmptest
New python executable in /home/alexv/.virtualenvs/tmptest/bin/python
Installing setuptools, pip, wheel...done.
(tmptest) alexv@AlexV-Linux:~/tmptest$ pip --version
pip 9.0.1 from /home/alexv/.virtualenvs/tmptest/local/lib/python2.7/site-packages (python 2.7)
(tmptest) alexv@AlexV-Linux:~/tmptest$ export PYTHONPATH=`pwd`/flask
(tmptest) alexv@AlexV-Linux:~/tmptest$ echo $PYTHONPATH
/home/alexv/tmptest/flask
(tmptest) alexv@AlexV-Linux:~/tmptest$ pip install -e flask
Obtaining file:///home/alexv/tmptest/flask
Collecting Werkzeug>=0.7 (from Flask==0.13.dev0)
/home/alexv/.virtualenvs/tmptest/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning.
SNIMissingWarning
/home/alexv/.virtualenvs/tmptest/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Using cached Werkzeug-0.11.15-py2.py3-none-any.whl
Collecting Jinja2>=2.4 (from Flask==0.13.dev0)
Using cached Jinja2-2.9.5-py2.py3-none-any.whl
Collecting itsdangerous>=0.21 (from Flask==0.13.dev0)
Collecting click>=2.0 (from Flask==0.13.dev0)
Using cached click-6.7-py2.py3-none-any.whl
Collecting MarkupSafe>=0.23 (from Jinja2>=2.4->Flask==0.13.dev0)
Installing collected packages: Werkzeug, MarkupSafe, Jinja2, itsdangerous, click, Flask
Running setup.py develop for Flask
Successfully installed Flask Jinja2-2.9.5 MarkupSafe-0.23 Werkzeug-0.11.15 click-6.7 itsdangerous-0.24
(tmptest) alexv@AlexV-Linux:~/tmptest$ cat ~/.virtualenvs/tmptest/lib/python2.7/site-packages/easy-install.pth
/home/alexv/tmptest/flask
(tmptest) alexv@AlexV-Linux:~/tmptest$ pip install -e requests
Obtaining file:///home/alexv/tmptest/requests
Installing collected packages: requests
Running setup.py develop for requests
Successfully installed requests
(tmptest) alexv@AlexV-Linux:~/tmptest$ cat ~/.virtualenvs/tmptest/lib/python2.7/site-packages/easy-install.pth
/home/alexv/tmptest/requests
Description:
When installing packages as
--editable
, pip add their path to<prefix>/lib/python2.7/site-packages/easy-install.pth
.So installing multiple package means we get one line per package in that file.
However if a package path is listed in PYTHONPATH, that line in easy-install.pth is removed.
Is this expected ?
I had naively assumed that PYTHONPATH shouldn't affect how installing a packages can hide others, only how they are found...
What I've run:
I was expecting :
which is the case when PYTHONPATH is empty.
The text was updated successfully, but these errors were encountered: