I can't run pipenv shell
command on CircleCI. It used to work few versions back, but stops working after upgrading to latest version. Relevant information below:
$ uname -a
Linux 68d69e284471 4.4.0-92-generic #115~14.04.1-Ubuntu SMP Thu Aug 10 15:06:53 UTC 2017 x86_64 GNU/Linux
$ python --version
Python 3.6.2
$ pipenv --version
pipenv, version 8.2.2
$ pipenv --where
/home/circleci/project
$ pipenv --venv
/home/circleci/.local/share/virtualenvs/project-zxI9dQ-Q
$ pipenv shell
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/lib/python3.6/site-packages/pipenv/cli.py", line 2057, in shell
do_shell(three=three, python=python, fancy=fancy, shell_args=shell_args)
File "/usr/local/lib/python3.6/site-packages/pipenv/cli.py", line 1952, in do_shell
shell = os.path.abspath(PIPENV_SHELL)
File "/usr/local/lib/python3.6/posixpath.py", line 369, in abspath
path = os.fspath(path)
TypeError: expected str, bytes or os.PathLike object, not NoneType
Pipenv 7.0.0 works fine.
Pipenv 8.0.0 shows this error (even though $SHELL is set to /bin/bash):
`Please ensure that the SHELL environment variable is set before activating shell.
I appreciate any help! Thank you for great tool :thumbsup:
why would you run shell
on ci?
Good question, I though that pipenv shell
is used to activate virtualenv... I did pipenv shell "cd docs; make html; exit"
. Now I'm using source $(pipenv --venv)/bin/activate; cd docs; make html
instead.
So, there's nothing wrong with source $(pipenv --venv)/bin/activate
? pipenv shell
is for local development only?
@tricoder42 Did you try pipenv run ...
instead?
correct
@philfreo I tried just now, it works great. Thank you!
Most helpful comment
@tricoder42 Did you try
pipenv run ...
instead?