question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`pipenv shell` doesn't work on CircleCI

See original GitHub issue

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 👍

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

6reactions
philfreocommented, Sep 29, 2017

@tricoder42 Did you try pipenv run ... instead?

6reactions
tricoder42commented, Sep 29, 2017

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?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: the command make collectstatic could not be found ...
Hi there,. I'm struggling to solve this one. At the end of my config, I have: - run: command: | pipenv run "make...
Read more >
CircleCI: very frustrating experience to get started
Hi, I'm new to CircleCI and it has been very frustrating to get a minimal Python/PyTest example working. According to this documentation, ...
Read more >
Docker build fails on CI - CircleCI Discuss
Hello, Docker build fails in 50% of cases (during pipenv install), failure example: 1st run with error: Step 14/21 : RUN pipenv install ......
Read more >
Pipenv missing PIPENV_PYPI_MIRROR - CircleCI Discuss
My branch passed tests fine. After merging I get an error about missing PIPENV_PYPI_MIRROR? #!/bin/bash -eo pipefail sudo pip install pipenv ...
Read more >
Can't find Python when installing dependencies
I have been running into this problem recently with all my Python project where CircleCI Linux environment can't seem to find Python.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found