{"action":"created","issue":{"url":"https://api.github.com/repos/pypa/pipenv/issues/2093","repository_url":"https://api.github.com/repos/pypa/pipenv","labels_url":"https://api.github.com/repos/pypa/pipenv/issues/2093/labels{/name}","comments_url":"https://api.github.com/repos/pypa/pipenv/issues/2093/comments","events_url":"https://api.github.com/repos/pypa/pipenv/issues/2093/events","html_url":"https://github.com/pypa/pipenv/issues/2093","id":318795653,"node_id":"MDU6SXNzdWUzMTg3OTU2NTM=","number":2093,"title":"`pipenv run` does *not* ensure required packages are installed","user":{"login":"halloleo","id":1521852,"node_id":"MDQ6VXNlcjE1MjE4NTI=","avatar_url":"https://avatars3.githubusercontent.com/u/1521852?v=4","gravatar_id":"","url":"https://api.github.com/users/halloleo","html_url":"https://github.com/halloleo","followers_url":"https://api.github.com/users/halloleo/followers","following_url":"https://api.github.com/users/halloleo/following{/other_user}","gists_url":"https://api.github.com/users/halloleo/gists{/gist_id}","starred_url":"https://api.github.com/users/halloleo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/halloleo/subscriptions","organizations_url":"https://api.github.com/users/halloleo/orgs","repos_url":"https://api.github.com/users/halloleo/repos","events_url":"https://api.github.com/users/halloleo/events{/privacy}","received_events_url":"https://api.github.com/users/halloleo/received_events","type":"User","site_admin":false},"labels":[{"id":727659787,"node_id":"MDU6TGFiZWw3Mjc2NTk3ODc=","url":"https://api.github.com/repos/pypa/pipenv/labels/documentation","name":"documentation","color":"006b75","default":false},{"id":541923427,"node_id":"MDU6TGFiZWw1NDE5MjM0Mjc=","url":"https://api.github.com/repos/pypa/pipenv/labels/needs%20more%20information","name":"needs more information","color":"fef2c0","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":16,"created_at":"2018-04-30T06:22:09Z","updated_at":"2018-07-23T04:51:32Z","closed_at":"2018-05-02T14:45:58Z","author_association":"NONE","body":"In a directory *without* a virtual environment the command\r\n\r\n    pipenv run python myprog.py\r\n\r\nfails with\r\n\r\n    Traceback (most recent call last):\r\n      File \"listmycmds.py\", line 19, in <module>\r\n        import argh\r\n    ModuleNotFoundError: No module named 'argh'\r\n\r\nalthough the module `argh` is in `requirements.txt`.\r\n\r\nWhen I run \r\n\r\n    pipenv install\r\n\r\nand *then*\r\n\r\n    pipenv run python myprog.py\r\n\r\neverything is fine.\r\n\r\nI expect - following the documentation - that `pipenv run ...` installs the required packages, but it doesn't.\r\n\r\n\r\n## Notes\r\n\r\n###  1. Running Python version\r\n\r\n* Pipenv is installed into the `python 3.5` which is located at /usr/bin/python3.\r\n* The environments I geenrate are using `Python3.6` which is located at /usr/local/bin/python3.6.\r\n\r\n### 2. `python -m pipenv.help` output\r\n\r\nHere the output from  *after* I ran my command:\r\n\r\n    <details><summary>$ python -m pipenv.help output</summary>\r\n    \r\n    Pipenv version: `'11.10.1'`\r\n    \r\n    Pipenv location: `'/usr/local/lib/python3.5/site-packages/pipenv'`\r\n    \r\n    Python location: `'/usr/bin/python3'`\r\n    \r\n    Other Python installations in `PATH`:\r\n    \r\n      - `2.6`: `/usr/bin/python2.6`\r\n      - `2.6`: `/usr/bin/python2.6`\r\n      - `2.7`: `/usr/local/bin/python2.7`\r\n      - `2.7`: `/usr/local/bin/python2.7`\r\n      - `3.4`: `/usr/local/bin/python3.4m`\r\n      - `3.4`: `/usr/local/bin/python3.4`\r\n      - `3.5`: `/usr/local/bin/python3.5m`\r\n      - `3.5`: `/usr/local/bin/python3.5`\r\n      - `3.6`: `/usr/local/bin/python3.6m`\r\n      - `3.6`: `/usr/local/bin/python3.6`\r\n    \r\n      - `2.6.6`: `/usr/bin/python`\r\n      - `2.6.6`: `/usr/bin/python2`\r\n      - `3.6.4`: `/home/broleo/bin/python3`\r\n      - `3.5.2`: `/usr/local/bin/python3`\r\n      - `3.5.2`: `/usr/bin/python3`\r\n    \r\n    PEP 508 Information:\r\n    \r\n    ```\r\n    {'implementation_name': 'cpython',\r\n     'implementation_version': '3.5.2',\r\n     'os_name': 'posix',\r\n     'platform_machine': 'x86_64',\r\n     'platform_python_implementation': 'CPython',\r\n     'platform_release': '4.1.12-94.5.7.el6uek.x86_64',\r\n     'platform_system': 'Linux',\r\n     'platform_version': '#2 SMP Thu Jul 20 18:39:04 PDT 2017',\r\n     'python_full_version': '3.5.2',\r\n     'python_version': '3.5',\r\n     'sys_platform': 'linux'}\r\n    ```\r\n    \r\n    System environment variables:\r\n    \r\n      - `PYTHONDONTWRITEBYTECODE`\r\n      - `PATH`\r\n      - `SSH_CLIENT`\r\n      - `EMACSEXE`\r\n      - `HOME`\r\n      - `INSIDE_EMACS`\r\n      - `SHELL`\r\n      - `TMUX`\r\n      - `PROMPT_COMMAND`\r\n      - `ORACLE_HOME`\r\n      - `SSH_TTY`\r\n      - `LS_COLORS`\r\n      - `LANG`\r\n      - `PIPENV_VENV_IN_PROJECT`\r\n      - `TERM`\r\n      - `QTINC`\r\n      - `PIP_PYTHON_PATH`\r\n      - `COLUMNS`\r\n      - `HTTPS_PROXY`\r\n      - `HOSTNAME`\r\n      - `_`\r\n      - `http_proxy`\r\n      - `TMUX_PANE`\r\n      - `HISTCONTROL`\r\n      - `https_proxy`\r\n      - `BROWSER`\r\n      - `SSH_CONNECTION`\r\n      - `LESSHISTFILE`\r\n      - `QTDIR`\r\n      - `PS1`\r\n      - `SHLVL`\r\n      - `PIPENV_DEFAULT_PYTHON_VERSION`\r\n      - `GIT_EDITOR`\r\n      - `HISTTIMEFORMAT`\r\n      - `USER`\r\n      - `DISPLAY`\r\n      - `LOGNAME`\r\n      - `HTTP_PROXY`\r\n      - `PWD`\r\n      - `MAIL`\r\n      - `WORKON_HOME`\r\n      - `QTLIB`\r\n      - `CVS_RSH`\r\n      - `MYCMDSPATH`\r\n      - `VENV`\r\n      - `LESSOPEN`\r\n      - `LD_LIBRARY_PATH`\r\n      - `HISTSIZE`\r\n      - `G_BROKEN_FILENAMES`\r\n      - `TERMCAP`\r\n    \r\n    Pipenv–specific environment variables:\r\n    \r\n     - `PIPENV_VENV_IN_PROJECT`: `yes`\r\n     - `PIPENV_DEFAULT_PYTHON_VERSION`: `3.6`\r\n    \r\n    Debug–specific environment variables:\r\n    \r\n      - `PATH`: `/home/broleo/bin:/working/software/bin::/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/u01/app/oracle/product/11.2.0/bin:/home/broleo/go/bin:/usr/local/nodejs/node8/bin`\r\n      - `SHELL`: `/bin/bash`\r\n      - `LANG`: `en_US.UTF-8`\r\n      - `PWD`: `/working/software/broleo/devel/system/listmycmds`\r\n    \r\n    \r\n    ---------------------------\r\n    \r\n    Contents of `Pipfile` ('/working/software/broleo/devel/system/listmycmds/Pipfile'):\r\n    \r\n    ```toml\r\n    [[source]]\r\n    \r\n    verify_ssl = true\r\n    name = \"pypi\"\r\n    url = \"https://pypi.python.org/simple\"\r\n    \r\n    \r\n    [dev-packages]\r\n    \r\n    \r\n    \r\n    [packages]\r\n    \r\n    argh = \">=0.26.2\"\r\n    \r\n    ```\r\n    \r\n    \r\n    Contents of `Pipfile.lock` ('/working/software/broleo/devel/system/listmycmds/Pipfile.lock'):\r\n    \r\n    ```json\r\n    {\r\n        \"_meta\": {\r\n            \"hash\": {\r\n                \"sha256\": \"c55ba166f3e7a75e9fef7b7f3212a61d66b6712edac5bd57ccc93c13f0668206\"\r\n            },\r\n            \"pipfile-spec\": 6,\r\n            \"requires\": {},\r\n            \"sources\": [\r\n                {\r\n                    \"name\": \"pypi\",\r\n                    \"url\": \"https://pypi.python.org/simple\",\r\n                    \"verify_ssl\": true\r\n                }\r\n            ]\r\n        },\r\n        \"default\": {\r\n            \"argh\": {\r\n                \"hashes\": [\r\n                    \"sha256:a9b3aaa1904eeb78e32394cd46c6f37ac0fb4af6dc488daa58971bdc7d7fcaf3\",\r\n                    \"sha256:e9535b8c84dc9571a48999094fda7f33e63c3f1b74f3e5f3ac0105a58405bb65\"\r\n                ],\r\n                \"index\": \"pypi\",\r\n                \"version\": \"==0.26.2\"\r\n            }\r\n        },\r\n        \"develop\": {}\r\n    }\r\n    \r\n    ```\r\n    </details>\r\n    \r\n"},"comment":{"url":"https://api.github.com/repos/pypa/pipenv/issues/comments/406938572","html_url":"https://github.com/pypa/pipenv/issues/2093#issuecomment-406938572","issue_url":"https://api.github.com/repos/pypa/pipenv/issues/2093","id":406938572,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNjkzODU3Mg==","user":{"login":"uranusjr","id":605277,"node_id":"MDQ6VXNlcjYwNTI3Nw==","avatar_url":"https://avatars1.githubusercontent.com/u/605277?v=4","gravatar_id":"","url":"https://api.github.com/users/uranusjr","html_url":"https://github.com/uranusjr","followers_url":"https://api.github.com/users/uranusjr/followers","following_url":"https://api.github.com/users/uranusjr/following{/other_user}","gists_url":"https://api.github.com/users/uranusjr/gists{/gist_id}","starred_url":"https://api.github.com/users/uranusjr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uranusjr/subscriptions","organizations_url":"https://api.github.com/users/uranusjr/orgs","repos_url":"https://api.github.com/users/uranusjr/repos","events_url":"https://api.github.com/users/uranusjr/events{/privacy}","received_events_url":"https://api.github.com/users/uranusjr/received_events","type":"User","site_admin":false},"created_at":"2018-07-23T04:51:32Z","updated_at":"2018-07-23T04:51:32Z","author_association":"COLLABORATOR","body":"Wouldn’t this work just as well—\r\n\r\n```\r\npipenv --three && pipenv run python build_script.py\r\n```\r\n\r\nI say we simply stop creating virtual environments for run and shell (and just error out). The alternative to the existing behaviour is straightforward and more explicit, and the change prevents a source of confusion.\r\n"}}
{"actor":{"display_login":"uranusjr"}}