{"id":1114,"hash":"801caeb3a936c03ab0599b176397ab673e40be3ee7f4538a4b55594c73381a70","pattern":"pipenv shell in Jenkins return the issue termios.error: (25, &#39;Inappropriate ioctl for device&#39;)","full_message":"I have a problem with my Jenkins that when I run a Job, Jenkins follow these steps:\n\n1 - pipenv install -r requirements.txt\n2 - pipenv shell \n\nAt this step is showing this error:\n\n+ pipenv shell\n17:26:04 Loading .env environment variables…\n17:26:04 Launching subshell in virtual environment…\n17:26:04 Traceback (most recent call last):\n17:26:04   File \"/usr/local/bin/pipenv\", line 11, in <module>\n17:26:04     sys.exit(cli())\n17:26:04   File \"/usr/local/lib/python3.6/dist-packages/pipenv/vendor/click/core.py\", line 764, in __call__\n17:26:04     return self.main(*args, **kwargs)\n17:26:04   File \"/usr/local/lib/python3.6/dist-packages/pipenv/vendor/click/core.py\", line 717, in main\n17:26:04     rv = self.invoke(ctx)\n17:26:04   File \"/usr/local/lib/python3.6/dist-packages/pipenv/vendor/click/core.py\", line 1137, in invoke\n17:26:04     return _process_result(sub_ctx.command.invoke(sub_ctx))\n17:26:04   File \"/usr/local/lib/python3.6/dist-packages/pipenv/vendor/click/core.py\", line 956, in invoke\n17:26:04     return ctx.invoke(self.callback, **ctx.params)\n17:26:04   File \"/usr/local/lib/python3.6/dist-packages/pipenv/vendor/click/core.py\", line 555, in invoke\n17:26:04     return callback(*args, **kwargs)\n17:26:04   File \"/usr/local/lib/python3.6/dist-packages/pipenv/vendor/click/decorators.py\", line 64, in new_func\n17:26:04     return ctx.invoke(f, obj, *args, **kwargs)\n17:26:04   File \"/usr/local/lib/python3.6/dist-packages/pipenv/vendor/click/core.py\", line 555, in invoke\n17:26:04     return callback(*args, **kwargs)\n17:26:04   File \"/usr/local/lib/python3.6/dist-packages/pipenv/cli/command.py\", line 390, in shell\n17:26:04     pypi_mirror=state.pypi_mirror,\n17:26:04   File \"/usr/local/lib/python3.6/dist-packages/pipenv/core.py\", line 2184, in do_shell\n17:26:04     shell.fork_compat(*fork_args)\n17:26:04   File \"/usr/local/lib/python3.6/dist-packages/pipenv/shells.py\", line 121, in fork_compat\n17:26:04     c.interact(escape_character=None)\n17:26:04   File \"/usr/local/lib/python3.6/dist-packages/pipenv/vendor/pexpect/pty_spawn.py\", line 761, in interact\n17:26:04     mode = tty.tcgetattr(self.STDIN_FILENO)\n17:26:04 termios.error: (25, 'Inappropriate ioctl for device')\n17:26:04 Build step 'Execute shell' marked build as failure\n17:26:05 Finished: FAILURE\n\nI've searched for this error and everything I found doesn't work for me, for instance:\n\n1- Execute pipenv shell --fancy\n\n2 - If I get in Jenkins machine and run pipenv shell it goes through \n\nroot@ip:~/.jenkins/workspace/Midhaz-Back-New-MR# pipenv shell\n+ pipenv shell\nLoading .env environment variables…\nLaunching subshell in virtual environment…\nroot@ip:~/.jenkins/workspace/Midhaz-Back-New-MR#  . /root/.local/share/virtualenvs/Midhaz-Back-New-MR-TllOp5eO/bin/activate\n(Midhaz-Back-New-MR) root@ip:~/.jenkins/workspace/Midhaz-Back-New-MR#","ecosystem":"pypi","package_name":"jenkins","package_version":null,"solution":"Jenkins is a non-interactive environment. All user input is nullified, and it's just an output console.\n\nSo you cannot run an interactive shell from it without redirection of the standard input.\n\nYou probably want something non-interactive but still in your virtual environment like:\n\npipenv run python my_script.py my_argument_1","confidence":0.95,"source":"stackoverflow","source_url":"https://stackoverflow.com/questions/54012510/pipenv-shell-in-jenkins-return-the-issue-termios-error-25-inappropriate-ioct","votes":23,"created_at":"2026-04-19T04:52:22.555493+00:00","updated_at":"2026-04-19T04:52:22.555493+00:00"}