-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pipenv install broken since upgrade #3047
Comments
The same thing happened to me in #3006 .This seems to be a rather important bug, I feel, because it messes up your "global"/system Python installation. |
I got a slightly different error on Windows. The above was on WSL/Ubuntu. |
Can you try if |
$ pipenv run pip install motoRequirement already satisfied: moto in /home/nmcauliffe/.local/share/virtualenvs/app-a-S7X17CUS/lib/python3.6/site-packages (1.3.6)
Collecting botocore<1.11,>=1.9.16 (from moto)
Downloading https://files.pythonhosted.org/packages/01/b7/cb08cd1af2bb0d0dfb393101a93b6ab6fb80f109ab7b37f2f34386c11351/botocore-1.10.84-py2.py3-none-any.whl (4.5MB)
100% |████████████████████████████████| 4.5MB 472kB/s
Requirement already satisfied: boto>=2.36.0 in /home/nmcauliffe/.local/share/virtualenvs/app-a-S7X17CUS/lib/python3.6/site-packages (from moto) (2.49.0)
Requirement already satisfied: jsondiff==1.1.1 in /home/nmcauliffe/.local/share/virtualenvs/app-a-S7X17CUS/lib/python3.6/site-packages (from moto) (1.1.1)
Requirement already satisfied: responses>=0.9.0 in /home/nmcauliffe/.local/share/virtualenvs/app-a-S7X17CUS/lib/python3.6/site-packages (from moto) (0.9.0)
Requirement already satisfied: six>1.9 in /home/nmcauliffe/.local/share/virtualenvs/app-a-S7X17CUS/lib/python3.6/site-packages (from moto) (1.11.0)
Requirement already satisfied: cryptography>=2.0.0 in /home/nmcauliffe/.local/share/virtualenvs/app-a-S7X17CUS/lib/python3.6/site-packages (from moto) (2.3.1)
Collecting boto3<1.8,>=1.6.16 (from moto)
Downloading https://files.pythonhosted.org/packages/ac/6e/faf7c6c3ae59641c75023fb5dcc8a02c33752ac8ccadf9931e8d8364f2fe/boto3-1.7.84-py2.py3-none-any.whl (128kB)
100% |████████████████████████████████| 133kB 470kB/s
Requirement already satisfied: aws-xray-sdk<0.96,>=0.93 in /home/nmcauliffe/.local/share/virtualenvs/app-a-S7X17CUS/lib/python3.6/site-packages (from moto) (0.95)
Requirement already satisfied: mock in /home/nmcauliffe/.local/share/virtualenvs/app-a-S7X17CUS/lib/python3.6/site-packages (from moto) (2.0.0)
Requirement already satisfied: requests>=2.5 in /home/nmcauliffe/.local/share/virtualenvs/app-a-S7X17CUS/lib/python3.6/site-packages (from moto) (2.19.1)
Requirement already satisfied: pytz in /home/nmcauliffe/.local/share/virtualenvs/app-a-S7X17CUS/lib/python3.6/site-packages (from moto) (2018.5)
Requirement already satisfied: pyaml in /home/nmcauliffe/.local/share/virtualenvs/app-a-S7X17CUS/lib/python3.6/site-packages (from moto) (17.12.1)
Requirement already satisfied: Jinja2>=2.7.3 in /home/nmcauliffe/.local/share/virtualenvs/app-a-S7X17CUS/lib/python3.6/site-packages (from moto) (2.10)
Requirement already satisfied: python-jose<3.0.0 in /home/nmcauliffe/.local/share/virtualenvs/app-a-S7X17CUS/lib/python3.6/site-packages (from moto) (2.0.2)
Requirement already satisfied: docker>=2.5.1 in /home/nmcauliffe/.local/share/virtualenvs/app-a-S7X17CUS/lib/python3.6/site-packages (from moto) (3.5.0)
Requirement already satisfied: xmltodict in /home/nmcauliffe/.local/share/virtualenvs/app-a-S7X17CUS/lib/python3.6/site-packages (from moto) (0.11.0)
Requirement already satisfied: werkzeug in /home/nmcauliffe/.local/share/virtualenvs/app-a-S7X17CUS/lib/python3.6/site-packages (from moto) (0.14.1)
Requirement already satisfied: python-dateutil<3.0.0,>=2.1 in /home/nmcauliffe/.local/share/virtualenvs/app-a-S7X17CUS/lib/python3.6/site-packages (from moto) (2.7.3)
Requirement already satisfied: cookies in /home/nmcauliffe/.local/share/virtualenvs/app-a-S7X17CUS/lib/python3.6/site-packages (from moto) (2.2.1)
Requirement already satisfied: jmespath<1.0.0,>=0.7.1 in /home/nmcauliffe/.local/share/virtualenvs/app-a-S7X17CUS/lib/python3.6/site-packages (from botocore<1.11,>=1.9.16->moto) (0.9.3)
Requirement already satisfied: docutils>=0.10 in /home/nmcauliffe/.local/share/virtualenvs/app-a-S7X17CUS/lib/python3.6/site-packages (from botocore<1.11,>=1.9.16->moto) (0.14)
Requirement already satisfied: asn1crypto>=0.21.0 in /home/nmcauliffe/.local/share/virtualenvs/app-a-S7X17CUS/lib/python3.6/site-packages (from cryptography>=2.0.0->moto) (0.24.0)
Requirement already satisfied: idna>=2.1 in /home/nmcauliffe/.local/share/virtualenvs/app-a-S7X17CUS/lib/python3.6/site-packages (from cryptography>=2.0.0->moto) (2.7)
Requirement already satisfied: cffi!=1.11.3,>=1.7 in /home/nmcauliffe/.local/share/virtualenvs/app-a-S7X17CUS/lib/python3.6/site-packages (from cryptography>=2.0.0->moto) (1.11.5)
Requirement already satisfied: s3transfer<0.2.0,>=0.1.10 in /home/nmcauliffe/.local/share/virtualenvs/app-a-S7X17CUS/lib/python3.6/site-packages (from boto3<1.8,>=1.6.16->moto) (0.1.13)
Requirement already satisfied: wrapt in /home/nmcauliffe/.local/share/virtualenvs/app-a-S7X17CUS/lib/python3.6/site-packages (from aws-xray-sdk<0.96,>=0.93->moto) (1.10.11)
Requirement already satisfied: jsonpickle in /home/nmcauliffe/.local/share/virtualenvs/app-a-S7X17CUS/lib/python3.6/site-packages (from aws-xray-sdk<0.96,>=0.93->moto) (1.0)
Requirement already satisfied: pbr>=0.11 in /home/nmcauliffe/.local/share/virtualenvs/app-a-S7X17CUS/lib/python3.6/site-packages (from mock->moto) (4.3.0)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /home/nmcauliffe/.local/share/virtualenvs/app-a-S7X17CUS/lib/python3.6/site-packages (from requests>=2.5->moto) (3.0.4)
Requirement already satisfied: certifi>=2017.4.17 in /home/nmcauliffe/.local/share/virtualenvs/app-a-S7X17CUS/lib/python3.6/site-packages (from requests>=2.5->moto) (2018.8.24)
Requirement already satisfied: urllib3<1.24,>=1.21.1 in /home/nmcauliffe/.local/share/virtualenvs/app-a-S7X17CUS/lib/python3.6/site-packages (from requests>=2.5->moto) (1.23)
Requirement already satisfied: PyYAML in /home/nmcauliffe/.local/share/virtualenvs/app-a-S7X17CUS/lib/python3.6/site-packages (from pyaml->moto) (3.13)
Requirement already satisfied: MarkupSafe>=0.23 in /home/nmcauliffe/.local/share/virtualenvs/app-a-S7X17CUS/lib/python3.6/site-packages (from Jinja2>=2.7.3->moto) (1.0)
Requirement already satisfied: future<1.0 in /home/nmcauliffe/.local/share/virtualenvs/app-a-S7X17CUS/lib/python3.6/site-packages (from python-jose<3.0.0->moto) (0.16.0)
Requirement already satisfied: ecdsa<1.0 in /home/nmcauliffe/.local/share/virtualenvs/app-a-S7X17CUS/lib/python3.6/site-packages (from python-jose<3.0.0->moto) (0.13)
Requirement already satisfied: pycryptodome<4.0.0,>=3.3.1 in /home/nmcauliffe/.local/share/virtualenvs/app-a-S7X17CUS/lib/python3.6/site-packages (from python-jose<3.0.0->moto) (3.6.6)
Requirement already satisfied: docker-pycreds>=0.3.0 in /home/nmcauliffe/.local/share/virtualenvs/app-a-S7X17CUS/lib/python3.6/site-packages (from docker>=2.5.1->moto) (0.3.0)
Requirement already satisfied: websocket-client>=0.32.0 in /home/nmcauliffe/.local/share/virtualenvs/app-a-S7X17CUS/lib/python3.6/site-packages (from docker>=2.5.1->moto) (0.53.0)
Requirement already satisfied: pycparser in /home/nmcauliffe/.local/share/virtualenvs/app-a-S7X17CUS/lib/python3.6/site-packages (from cffi!=1.11.3,>=1.7->cryptography>=2.0.0->moto) (2.19)
Installing collected packages: botocore, boto3
Found existing installation: botocore 1.12.22
Uninstalling botocore-1.12.22:
Successfully uninstalled botocore-1.12.22
Rolling back uninstall of botocore
Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/lib/python3.6'
Consider using the `--user` option or check the permissions.
You are using pip version 18.0, however version 18.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command. $ pipenv run pip install ncclientCollecting ncclient
Downloading https://files.pythonhosted.org/packages/dc/95/acc44c2ff966743fedd1ad991ecf2498f40fd434883c67138b60a6373d49/ncclient-0.6.3.tar.gz (88kB)
100% |████████████████████████████████| 92kB 138kB/s
Requirement already satisfied: setuptools>0.6 in /home/nmcauliffe/.local/share/virtualenvs/app-a-S7X17CUS/lib/python3.6/site-packages (from ncclient) (40.0.0)
Collecting paramiko>=1.15.0 (from ncclient)
Downloading https://files.pythonhosted.org/packages/cf/ae/94e70d49044ccc234bfdba20114fa947d7ba6eb68a2e452d89b920e62227/paramiko-2.4.2-py2.py3-none-any.whl (193kB)
100% |████████████████████████████████| 194kB 740kB/s
Collecting lxml>=3.3.0 (from ncclient)
Using cached https://files.pythonhosted.org/packages/03/a4/9eea8035fc7c7670e5eab97f34ff2ef0ddd78a491bf96df5accedb0e63f5/lxml-4.2.5-cp36-cp36m-manylinux1_x86_64.whl
Collecting selectors2>=2.0.1 (from ncclient)
Using cached https://files.pythonhosted.org/packages/c9/89/8a07d6d6c78422c5151f68453e9741af4cd82bebcfa73923f73b3bdbef0d/selectors2-2.0.1-py2.py3-none-any.whl
Requirement already satisfied: six in /home/nmcauliffe/.local/share/virtualenvs/app-a-S7X17CUS/lib/python3.6/site-packages (from ncclient) (1.11.0)
Collecting pyasn1>=0.1.7 (from paramiko>=1.15.0->ncclient)
Using cached https://files.pythonhosted.org/packages/d1/a1/7790cc85db38daa874f6a2e6308131b9953feb1367f2ae2d1123bb93a9f5/pyasn1-0.4.4-py2.py3-none-any.whl
Collecting bcrypt>=3.1.3 (from paramiko>=1.15.0->ncclient)
Using cached https://files.pythonhosted.org/packages/b8/09/905ec939994e2c49dcffff72f823802557f166b3815ea54c1db3671eed42/bcrypt-3.1.4-cp36-cp36m-manylinux1_x86_64.whl
Requirement already satisfied: cryptography>=1.5 in /home/nmcauliffe/.local/share/virtualenvs/app-a-S7X17CUS/lib/python3.6/site-packages (from paramiko>=1.15.0->ncclient) (2.3.1)
Collecting pynacl>=1.0.1 (from paramiko>=1.15.0->ncclient)
Downloading https://files.pythonhosted.org/packages/27/15/2cd0a203f318c2240b42cd9dd13c931ddd61067809fee3479f44f086103e/PyNaCl-1.3.0-cp34-abi3-manylinux1_x86_64.whl (759kB)
100% |████████████████████████████████| 768kB 1.0MB/s
Requirement already satisfied: cffi>=1.1 in /home/nmcauliffe/.local/share/virtualenvs/app-a-S7X17CUS/lib/python3.6/site-packages (from bcrypt>=3.1.3->paramiko>=1.15.0->ncclient) (1.11.5)
Requirement already satisfied: idna>=2.1 in /home/nmcauliffe/.local/share/virtualenvs/app-a-S7X17CUS/lib/python3.6/site-packages (from cryptography>=1.5->paramiko>=1.15.0->ncclient) (2.7)
Requirement already satisfied: asn1crypto>=0.21.0 in /home/nmcauliffe/.local/share/virtualenvs/app-a-S7X17CUS/lib/python3.6/site-packages (from cryptography>=1.5->paramiko>=1.15.0->ncclient) (0.24.0)
Requirement already satisfied: pycparser in /home/nmcauliffe/.local/share/virtualenvs/app-a-S7X17CUS/lib/python3.6/site-packages (from cffi>=1.1->bcrypt>=3.1.3->paramiko>=1.15.0->ncclient) (2.19)
Building wheels for collected packages: ncclient
Running setup.py bdist_wheel for ncclient ... done
Stored in directory: /home/nmcauliffe/.cache/pip/wheels/02/53/2f/ea7066e29477ca43cc166cdf14e64b87f3dd4e26c4f673adf2
Successfully built ncclient
Installing collected packages: pyasn1, bcrypt, pynacl, paramiko, lxml, selectors2, ncclient
Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/lib/python3.6'
Consider using the `--user` option or check the permissions.
You are using pip version 18.0, however version 18.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command. |
Is this happening mainly for WSL users? I don’t have a WSL environment to test on unfortunately |
No, I believe the exact same thing happened for me, too, in #3006 on Windows 10 without WSL. Unfortunately I cannot test the the suggestion from @uranusjr because with the latest 2018.10.13 release pipenv became completely broken. Also, testing this issue here is a little bit tricky because every time it happened my system Python installation got so messed up that I had to uninstall and reinstall Python itself. |
erm, are you running pipenv as root? How is it altering your system python installation? Please don't run pipenv as root. At a glance, it seems like your problems are possibly coming from running pipenv inside of |
This issue seems incredibly odd, I'm not completely sure what happens when you cross between WSL and system installs but I suspect it matters how you actually installed python in the first place. I don't think this bug is still present in pipenv but if it is we definitely need to track it down before we cut the next release |
@techalchemy i'm not running as root. I did try running pipenv install both inside the shell and outside the shell with the same permission denied warning.
Due to VSCode not being completely integrated with WSL, I have virtualenvs w/in the "windows" environment. I am getting a similar issue there.
|
Hmmmm ok. Hopefully that’s enough info, I can guess at the problem anyway. I’ll borrow a laptop from someone at work to test |
Can you guys tell me the value of your environment variables |
Looks like none of those variables are set in or out of |
I think I have this sorted in the next release |
@techalchemy thanks for fixing! When does this get released? |
Release is up :) |
Issue description
Attempting to run
pipenv install
results in pipenv attempting to install packages to system library rather than venv.Expected result
pipenv install
to install packages to venv for project.Actual result
Partial output:
pipenv install --verbose
Steps to replicate
$ pipenv --support
Pipenv version:
'2018.10.13'
Pipenv location:
'/home/nmcauliffe/.local/lib/python3.6/site-packages/pipenv'
Python location:
'/usr/bin/python3'
Python installations found:
3.6.6
:/usr/bin/python3.6
3.6.6
:/usr/bin/python3.6m
3.6.6
:/mnt/c/Users/Nmcauliffe/AppData/Local/Programs/Python/Python36/python.exe
3.6.6
:/mnt/c/Users/Nmcauliffe/AppData/Local/Programs/Python/Python36/pythonw.exe
3.6.5
:/home/nmcauliffe/.local/share/virtualenvs/app-a-S7X17CUS/bin/python3
PEP 508 Information:
System environment variables:
LS_COLORS
HOSTTYPE
LESSCLOSE
LANG
DISPLAY
OLDPWD
VIRTUAL_ENV
USER
PIP_PYTHON_PATH
PWD
HOME
PIP_SHIMS_BASE_MODULE
NAME
XDG_DATA_DIRS
PIPENV_ACTIVE
TERM
SHELL
PYTHONDONTWRITEBYTECODE
SHLVL
LOGNAME
PATH
PS1
LESSOPEN
_
Pipenv–specific environment variables:
PIPENV_ACTIVE
:1
Debug–specific environment variables:
PATH
:/home/nmcauliffe/.local/share/virtualenvs/app-a-S7X17CUS/bin:/home/nmcauliffe/.local/bin:/home/nmcauliffe/.local/bin:/home/nmcauliffe/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Program Files (x86)/Intel/iCLS Client:/mnt/c/ProgramData/Oracle/Java/javapath:/mnt/c/Program Files/Intel/iCLS Client:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Program Files (x86)/PuTTY:/mnt/c/Program Files/OpenVPN/bin:/mnt/c/HashiCorp/Vagrant/bin:/mnt/c/Program Files/Intel/WiFi/bin:/mnt/c/Program Files/Common Files/Intel/WirelessCommon:/mnt/c/Windows/System32/OpenSSH:/mnt/c/Program Files/Git/cmd:/mnt/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/DAL:/mnt/c/Program Files/Intel/Intel(R) Management Engine Components/DAL:/mnt/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/IPT:/mnt/c/Program Files/Intel/Intel(R) Management Engine Components/IPT:/mnt/c/opscode/chefdk/bin:/mnt/c/Users/Nmcauliffe/AppData/Local/Programs/Python/Python36/Scripts:/mnt/c/Users/Nmcauliffe/AppData/Local/Programs/Python/Python36:/mnt/c/Users/Nmcauliffe/AppData/Local/Microsoft/WindowsApps:/mnt/c/HashiCorp/Terraform:/mnt/c/Users/Nmcauliffe/AppData/Local/Programs/Microsoft VS Code/bin:/mnt/c/Users/Nmcauliffe/AppData/Local/hyper/app-2.0.0/resources/bin:/snap/bin
SHELL
:/bin/bash
LANG
:C.UTF-8
PWD
:/home/nmcauliffe/repos/app-a
VIRTUAL_ENV
:/home/nmcauliffe/.local/share/virtualenvs/app-a-S7X17CUS
Contents of
Pipfile
('/mnt/c/Users/Nmcauliffe/repos/app-a/Pipfile'):Contents of
Pipfile.lock
('/mnt/c/Users/Nmcauliffe/repos/app-a/Pipfile.lock'):The text was updated successfully, but these errors were encountered: