pipenv shell error

Created on 30 Mar 2018  路  5Comments  路  Source: pypa/pipenv

After I install package by pipenv in Windows and run following command: pipenv shell. Then it come up with AttributeError. How could I fix problem.


Expected result

Go into virtualenv

Actual result
Traceback (most recent call last):
  File "c:\users\ricky\anaconda3\lib\site-packages\pipenv\core.py", line 2142, in do_shell
    c = pexpect.spawn(
AttributeError: module 'pexpect' has no attribute 'spawn'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\users\ricky\anaconda3\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\users\ricky\anaconda3\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\ricky\Anaconda3\Scripts\pipenv.exe\__main__.py", line 9, in <module>
  File "c:\users\ricky\anaconda3\lib\site-packages\pipenv\vendor\click\core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "c:\users\ricky\anaconda3\lib\site-packages\pipenv\vendor\click\core.py", line 697, in main
    rv = self.invoke(ctx)
  File "c:\users\ricky\anaconda3\lib\site-packages\pipenv\vendor\click\core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "c:\users\ricky\anaconda3\lib\site-packages\pipenv\vendor\click\core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "c:\users\ricky\anaconda3\lib\site-packages\pipenv\vendor\click\core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "c:\users\ricky\anaconda3\lib\site-packages\pipenv\cli.py", line 572, in shell
    three=three, python=python, fancy=fancy, shell_args=shell_args
  File "c:\users\ricky\anaconda3\lib\site-packages\pipenv\core.py", line 2156, in do_shell
    pew.workon_cmd([workon_name])
  File "c:\users\ricky\anaconda3\lib\site-packages\pipenv\patched\pew\pew.py", line 379, in workon_cmd
    shell(env, cwd=project_dir)
  File "c:\users\ricky\anaconda3\lib\site-packages\pipenv\patched\pew\pew.py", line 206, in shell
    shell_name = Path(shell).stem
  File "c:\users\ricky\anaconda3\lib\pathlib.py", line 979, in __new__
    self = cls._from_parts(args, init=False)
  File "c:\users\ricky\anaconda3\lib\pathlib.py", line 654, in _from_parts
    drv, root, parts = self._parse_args(args)
  File "c:\users\ricky\anaconda3\lib\pathlib.py", line 638, in _parse_args
    a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType
Windows Needs More Information

All 5 comments

What shell are you using (cmd or powershell or otherwise)? Are you using console emulators like ConEmu or Cmder?

Got the same issue here. Using Git for Windows's Bash. Reopen please?(

@feakuru Unfortunately Msys is not supported at the moment. There are no plan to add support either unless there are new contributors interested in it.

Just use pipenv run.

Note this might work fine with the latest version, I use it with fish on MSYS2 all the time

Was this page helpful?
0 / 5 - 0 ratings

Related issues

erinxocon picture erinxocon  路  3Comments

leileigong picture leileigong  路  3Comments

jacebrowning picture jacebrowning  路  3Comments

xi picture xi  路  3Comments

konstin picture konstin  路  3Comments