Description
This is as much an issue report as a potential question/documentation request if I'm just setting up the project wrong for contributing. I'm trying to fix #2504, but unable to install the development environment after cloning the repo. I didn't see anything in particular for how to set up the local development environment, so assumed it just required pipenv install --dev
.
Issue description
Cloning the repo and trying to pipenv install --dev
fails because it tries to use a mix of the repo code and the global pipenv code. For example, version 2018.7.1 has pipenv.pew
, but that's removed on master, so (interestingly) passively fails to import. It continues on to hard fail later due to location
being None
in pipenv.core.which when passed to os.path.join
.
Also of note: just running pipenv install
completes without any modifications, but doesn't actually create the virtualenv even thought it says it is (there are no non-dev packages). I'm not sure if skipping an empty virtualenv is desired behavior or not.
If I rename the pipenv
directory to src/pipenv
and update setup.py
(probably incomplete setup.py.patch), it is able to complete the installation.
Expected result
The global pipenv
code to be used to install the repo, and then after that the local development version (as specified in the Pipfile dev section).
Actual result
[I] ~/s/g/p/pipenv (master|✔) $ which pipenv
/usr/local/bin/pipenv
[I] ~/s/g/p/pipenv (master|✔) $ pipenv --version
pipenv, version 2018.7.1
[I] ~/s/g/p/pipenv (master|✔) $ pipenv install --dev --verbose
Creating a virtualenv for this project...
Pipfile: /Users/jacobhayes/src/github.com/pypa/pipenv/Pipfile
Using /usr/local/bin/python3 (3.6.5) to create virtualenv...
⠋/usr/local/bin/python3: No module named pipenv.pew
Virtualenv location:
Installing -e ....
⠙Installing '-e .'
⠸/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/setuptools/dist.py:517: UserWarning: Module attr was already imported from /usr/local/lib/python3.6/site-packages/pipenv/vendor/attr/__init__.py, but /Users/jacobhayes/src/github.com/pypa/pipenv/.eggs/attrs-18.1.0-py3.6.egg is being added to sys.path
pkg_resources.working_set.add(dist, replace=True)
Traceback (most recent call last):
File "/usr/local/bin/pipenv", line 11, in <module>
sys.exit(cli())
File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pipenv/cli.py", line 435, in install
selective_upgrade=selective_upgrade,
File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pipenv/core.py", line 1933, in do_install
pypi_mirror=pypi_mirror,
File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pipenv/core.py", line 1429, in pip_install
quoted_pip = which_pip(allow_global=allow_global)
File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pipenv/core.py", line 1488, in which_pip
return which("pip")
File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pipenv/core.py", line 110, in which
p = os.path.join(location, "bin", command)
File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/posixpath.py", line 80, in join
a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType
Steps to replicate
pip3 install pipenv==v2018.07.01
git clone git@github.com:pypa/pipenv.git
cd pipenv
pipenv install --dev
Here is the support output when run outside of the repo/virtualenv.
$ pipenv --support
Pipenv version: '2018.7.1'
Pipenv location: '/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pipenv'
Python location: '/usr/local/bin/python3'
Other Python installations in PATH
:
-
2.7
:/usr/local/bin/python2.7
-
2.7
:/usr/local/bin/python2.7
-
2.7
:/usr/bin/python2.7
-
3.6
:/usr/local/bin/python3.6m
-
3.6
:/usr/local/bin/python3.6
-
2.7.15
:/usr/local/bin/python
-
2.7.10
:/usr/bin/python
-
2.7.15
:/usr/local/bin/python2
-
3.6.5
:/usr/local/bin/python3
PEP 508 Information:
{'implementation_name': 'cpython',
'implementation_version': '3.6.5',
'os_name': 'posix',
'platform_machine': 'x86_64',
'platform_python_implementation': 'CPython',
'platform_release': '17.6.0',
'platform_system': 'Darwin',
'platform_version': 'Darwin Kernel Version 17.6.0: Tue May 8 15:22:16 PDT '
'2018; root:xnu-4570.61.1~1/RELEASE_X86_64',
'python_full_version': '3.6.5',
'python_version': '3.6',
'sys_platform': 'darwin'}
System environment variables:
Apple_PubSub_Socket_Render
COLORFGBG
COLORTERM
COPYFILE_DISABLE
EDITOR
GOPATH
HOME
ITERM_PROFILE
ITERM_SESSION_ID
LANG
LOGNAME
PAGER
PATH
PWD
SECURITYSESSIONID
SHELL
SHLVL
SSH_AUTH_SOCK
TERM
TERM_PROGRAM
TERM_PROGRAM_VERSION
TERM_SESSION_ID
TMPDIR
TMUX
TMUX_PANE
TMUX_PLUGIN_MANAGER_PATH
USER
XPC_FLAGS
XPC_SERVICE_NAME
__CF_USER_TEXT_ENCODING
PYTHONDONTWRITEBYTECODE
PIP_PYTHON_PATH
Pipenv–specific environment variables:
Debug–specific environment variables:
PATH
:/Users/jacobhayes/bin:/Users/jacobhayes/bin:/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/bin:/Users/jacobhayes/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
SHELL
:/usr/local/bin/fish
EDITOR
:vim
LANG
:en_US.UTF-8
PWD
:/Users/jacobhayes/src/github.com/pypa