{"action":"created","issue":{"url":"https://api.github.com/repos/pypa/pipenv/issues/2849","repository_url":"https://api.github.com/repos/pypa/pipenv","labels_url":"https://api.github.com/repos/pypa/pipenv/issues/2849/labels{/name}","comments_url":"https://api.github.com/repos/pypa/pipenv/issues/2849/comments","events_url":"https://api.github.com/repos/pypa/pipenv/issues/2849/events","html_url":"https://github.com/pypa/pipenv/issues/2849","id":359932676,"node_id":"MDU6SXNzdWUzNTk5MzI2NzY=","number":2849,"title":"pipenv clean does not clean packages from the virtual env, but some packages from the global env","user":{"login":"ociule","id":54329,"node_id":"MDQ6VXNlcjU0MzI5","avatar_url":"https://avatars0.githubusercontent.com/u/54329?v=4","gravatar_id":"","url":"https://api.github.com/users/ociule","html_url":"https://github.com/ociule","followers_url":"https://api.github.com/users/ociule/followers","following_url":"https://api.github.com/users/ociule/following{/other_user}","gists_url":"https://api.github.com/users/ociule/gists{/gist_id}","starred_url":"https://api.github.com/users/ociule/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ociule/subscriptions","organizations_url":"https://api.github.com/users/ociule/orgs","repos_url":"https://api.github.com/users/ociule/repos","events_url":"https://api.github.com/users/ociule/events{/privacy}","received_events_url":"https://api.github.com/users/ociule/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2018-09-13T14:53:33Z","updated_at":"2018-10-17T07:45:35Z","closed_at":"2018-10-10T15:28:16Z","author_association":"NONE","body":"##### Issue description\r\n\r\nI am trying to run `pipenv clean` after removing a package from Pipfile and running `pipfile lock`\r\n\r\n##### Expected result\r\n\r\nThat the removed packaged is uninstalled by pipenv clean.\r\n\r\n##### Actual result\r\n\r\nPipenv actually tries to remove 4 packages from the global env: pipenv, virtualenv, virtualenv-clone and certifi. It doesn't actually remove them. Maybe it's actually removing them from another virtualenv ?\r\n\r\n##### Steps to replicate\r\n\r\nCreate a project, add a package with pipenv install.\r\n\r\nRemove it by editing the Pipfile. \r\n\r\nRun pipfile lock to update Pipfile.lock\r\n\r\nRun pipfile clean to remove the package you edited out of Pipfile.\r\n\r\nPipenv clean --dry-run just lists the names of the 4 packages it tries to remove: pipenv, virtualenv, virtualenv-clone, certifi\r\n\r\nI then run pip list and the package I removed from Pipfile is still there in the venv. The 4 packages it tried to remove are not even installed in the venv.\r\n\r\nI have tested this on both the latest pip release and pipenv master, on Windows. I've tested on both  cmd.exe and git bash. Yeah I know bash is not officially supported, that's why I reproed on cmd.exe\r\n\r\nThis happens in the venv shell or not, and by running 'pipenv run pipenv clean' too.\r\n\r\nUpdate:\r\nAmusingly, if I do install one of the four packages in the venv, it does uninstall it, which points to the code that gets that list as being faulty. The code that tries to uninstall the packages from that list is at fault for failing silently, though.\r\n\r\nI can try to repro on Mac OS later tonight\r\n\r\n-------------------------------------------------------------------------------\r\n\r\n\r\n<details><summary>$ pipenv --support</summary>\r\n\r\nPipenv version: `'2018.7.1.dev0'`\r\n\r\nPipenv location: `'C:\\\\Users\\\\safco106950\\\\AppData\\\\Roaming\\\\Python\\\\Python37\\\\site-packages\\\\pipenv'`\r\n\r\nPython location: `'c:\\\\users\\\\safco106950\\\\appdata\\\\local\\\\programs\\\\python\\\\python37\\\\python.exe'`\r\n\r\nPython installations found:\r\n\r\n  - `3.7.0`: `C:\\Users\\safco106950\\AppData\\Local\\Programs\\Python\\Python37\\python.exe`\r\n  - `3.6.5`: `C:\\Users\\safco106950\\AppData\\Local\\Programs\\Python\\Python36-32\\python.exe`\r\n  - `3.5`: `C:\\Users\\safco106950\\AppData\\Local\\Programs\\Python\\Python35\\python.exe`\r\n\r\nPEP 508 Information:\r\n\r\n```\r\n{'implementation_name': 'cpython',\r\n 'implementation_version': '3.7.0',\r\n 'os_name': 'nt',\r\n 'platform_machine': 'AMD64',\r\n 'platform_python_implementation': 'CPython',\r\n 'platform_release': '7',\r\n 'platform_system': 'Windows',\r\n 'platform_version': '6.1.7601',\r\n 'python_full_version': '3.7.0',\r\n 'python_version': '3.7',\r\n 'sys_platform': 'win32'}\r\n```\r\n\r\nSystem environment variables:\r\n\r\n  - `ALLUSERSPROFILE`\r\n  - `APPDATA`\r\n  - `CLASSPATH`\r\n  - `COMMONPROGRAMFILES`\r\n  - `COMMONPROGRAMFILES(X86)`\r\n  - `COMMONPROGRAMW6432`\r\n  - `COMPUTERNAME`\r\n  - `COMSPEC`\r\n  - `DADIR`\r\n  - `DEFLOGDIR`\r\n  - `FP_NO_HOST_CHECK`\r\n  - `HOMEDRIVE`\r\n  - `HOMEPATH`\r\n  - `LOCALAPPDATA`\r\n  - `LOGONSERVER`\r\n  - `NUMBER_OF_PROCESSORS`\r\n  - `OS`\r\n  - `PATH`\r\n  - `PATHEXT`\r\n  - `PIPENV_ACTIVE`\r\n  - `PIP_PYTHON_PATH`\r\n  - `PROCESSOR_ARCHITECTURE`\r\n  - `PROCESSOR_IDENTIFIER`\r\n  - `PROCESSOR_LEVEL`\r\n  - `PROCESSOR_REVISION`\r\n  - `PROGRAMDATA`\r\n  - `PROGRAMFILES`\r\n  - `PROGRAMFILES(X86)`\r\n  - `PROGRAMW6432`\r\n  - `PROMPT`\r\n  - `PSMODULEPATH`\r\n  - `PUBLIC`\r\n  - `PYTHONDONTWRITEBYTECODE`\r\n  - `QTJAVA`\r\n  - `SAPLOGON_INI_FILE`\r\n  - `SESSIONNAME`\r\n  - `SYSTEMDRIVE`\r\n  - `SYSTEMROOT`\r\n  - `TEMP`\r\n  - `TMP`\r\n  - `UATDATA`\r\n  - `USERDNSDOMAIN`\r\n  - `USERDOMAIN`\r\n  - `USERDOMAIN_ROAMINGPROFILE`\r\n  - `USERNAME`\r\n  - `USERPROFILE`\r\n  - `VIRTUAL_ENV`\r\n  - `VSEDEFLOGDIR`\r\n  - `WINDIR`\r\n  - `WINDOWS_TRACING_FLAGS`\r\n  - `WINDOWS_TRACING_LOGFILE`\r\n\r\nPipenvûspecific environment variables:\r\n\r\n - `PIPENV_ACTIVE`: `1`\r\n\r\nDebugûspecific environment variables:\r\n\r\n  - `PATH`: `C:\\Users\\safco106950\\.virtualenvs\\jupyter_test-UM4uSYuv\\Scripts;C:\\Users\\safco106950\\AppData\\Roaming\\Python\\Python37\\Scripts;C:\\Users\\safco106950\\AppData\\Local\\Programs\\Python\\Python37\\Scripts;C:\\users-apps\\Oracle\\ora1123\\bin;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files (x86)\\Common Files\\Hitachi ID;C:\\Program Files (x86)\\Microsoft Application Virtualization Client;C:\\Program Files (x86)\\QuickTime\\QTSystem\\;C:\\Program Files (x86)\\Enterprise Vault\\EVClient\\;C:\\Program Files (x86)\\CheckPoint\\Endpoint Security\\Endpoint Common\\bin;C:\\Users\\safco106950\\AppData\\Local\\Programs\\Python\\Launcher\\;C:\\Users\\safco106950\\AppData\\Local\\Programs\\Python\\Python36-32\\Scripts\\;C:\\Users\\safco106950\\AppData\\Local\\Programs\\Python\\Python36-32\\;C:\\Users\\safco106950\\AppData\\Local\\atom\\bin;C:\\Users\\safco106950\\AppData\\Local\\Pandoc\\`\r\n  - `VIRTUAL_ENV`: `C:\\Users\\safco106950\\.virtualenvs\\jupyter_test-UM4uSYuv`\r\n\r\n\r\n---------------------------\r\n\r\nContents of `Pipfile` ('C:\\\\Users\\\\safco106950\\\\work\\\\jupyter_test\\\\Pipfile'):\r\n\r\n```toml\r\n[[source]]\r\nurl = \"https://pypi.org/simple\"\r\nverify_ssl = true\r\nname = \"pypi\"\r\n\r\n[packages]\r\n\r\n[dev-packages]\r\n\r\n[requires]\r\npython_version = \"3.6\"\r\n\r\n```\r\n\r\n\r\nContents of `Pipfile.lock` ('C:\\\\Users\\\\safco106950\\\\work\\\\jupyter_test\\\\Pipfile.lock'):\r\n\r\n```json\r\n{\r\n    \"_meta\": {\r\n        \"hash\": {\r\n            \"sha256\": \"415dfdcb118dd9bdfef17671cb7dcd78dbd69b6ae7d4f39e8b44e71d60ca72e7\"\r\n        },\r\n        \"pipfile-spec\": 6,\r\n        \"requires\": {\r\n            \"python_version\": \"3.6\"\r\n        },\r\n        \"sources\": [\r\n            {\r\n                \"name\": \"pypi\",\r\n                \"url\": \"https://pypi.org/simple\",\r\n                \"verify_ssl\": true\r\n            }\r\n        ]\r\n    },\r\n    \"default\": {},\r\n    \"develop\": {}\r\n}\r\n\r\n```\r\n</details>\r\n"},"comment":{"url":"https://api.github.com/repos/pypa/pipenv/issues/comments/430525049","html_url":"https://github.com/pypa/pipenv/issues/2849#issuecomment-430525049","issue_url":"https://api.github.com/repos/pypa/pipenv/issues/2849","id":430525049,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMDUyNTA0OQ==","user":{"login":"svenpanne","id":5070764,"node_id":"MDQ6VXNlcjUwNzA3NjQ=","avatar_url":"https://avatars3.githubusercontent.com/u/5070764?v=4","gravatar_id":"","url":"https://api.github.com/users/svenpanne","html_url":"https://github.com/svenpanne","followers_url":"https://api.github.com/users/svenpanne/followers","following_url":"https://api.github.com/users/svenpanne/following{/other_user}","gists_url":"https://api.github.com/users/svenpanne/gists{/gist_id}","starred_url":"https://api.github.com/users/svenpanne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svenpanne/subscriptions","organizations_url":"https://api.github.com/users/svenpanne/orgs","repos_url":"https://api.github.com/users/svenpanne/repos","events_url":"https://api.github.com/users/svenpanne/events{/privacy}","received_events_url":"https://api.github.com/users/svenpanne/received_events","type":"User","site_admin":false},"created_at":"2018-10-17T07:45:35Z","updated_at":"2018-10-17T07:45:35Z","author_association":"NONE","body":"> Ah yes please, open it here with output included @svenpanne — thanks and sorry for the trouble!\r\n\r\nI just reinstalled pipenv from master (8212a211aa417ae5e1d6402485dd82937bf3eef0), and `pipenv clean` seems to work fine now, so from my POV there is no need for a separate issue anymore.\r\n\r\nCan we get a new `pipenv` release soon? All recent versions release so far had one or more serious bugs making them unusable in our CI and daily work... :-("}}
{"actor":{"display_login":"svenpanne"}}