Python sees `json` module but pipenv doesn't. Why?

萝らか妹 提交于 2019-12-23 03:54:07

问题


I am trying to help a coworker configure their VM. I am having a very strange problem:

Z:\codebase>pipenv uninstall
Locking [dev-packages] dependencies.
Locking [packages] dependencies.
nv\\resolver.py", line 3, in <module>
    import json
ModuleNotFoundError: No module named 'json'


Z:\codebase>python
Python 3.5.3 (v3.5.3:1880cb95a742, Jan 16 2017, 16:02:32) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import json
>>> json
<module 'json' from 'C:\\Program Files\\Python35\\lib\\json\\__init__.py'>
>>>

So python can import json when I run it directly, but not when pipenv is running python. What could be causing this? Could pipenv be using an incorrect python path?

来源:https://stackoverflow.com/questions/52821011/python-sees-json-module-but-pipenv-doesnt-why

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!