试图测试我的python库,它';已安装但未找到

试图测试我的python库,它';已安装但未找到,python,pip,Python,Pip,当我尝试在本地安装并测试我的库时,它显示为已安装: PS C:\Projects\pypi\potatoutils> pip install -e . Obtaining file:///C:/Projects/pypi/potatoutils Installing collected packages: potatoutils Attempting uninstall: potatoutils Found existing installation: potatoutils

当我尝试在本地安装并测试我的库时,它显示为已安装:

PS C:\Projects\pypi\potatoutils> pip install -e .
Obtaining file:///C:/Projects/pypi/potatoutils
Installing collected packages: potatoutils
  Attempting uninstall: potatoutils
    Found existing installation: potatoutils 0.0.1
    Uninstalling potatoutils-0.0.1:
      Successfully uninstalled potatoutils-0.0.1
  Running setup.py develop for potatoutils
Successfully installed potatoutils
但是当我试着测试它的时候

PS C:\Projects\pypi\potatoutils> python
Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import potatoutils
我得到这个错误:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'potatoutils'
回溯(最近一次呼叫最后一次):
文件“”,第1行,在
ModuleNotFoundError:没有名为“Potatootils”的模块
我做错了什么

编辑:pip和python具有相同的版本(3.7),并且它们的路径匹配


当我使用pip list时,这个库就会显示出来。

如果您使用pip for python2.x安装一个软件包,这通常就是问题所在 但是,当您尝试为python3.x导入库时


确保您正在运行安装正确python版本的pip包。

使用pip使用pip3有时指向python 2.x版本,这就是为什么它可能会有所帮助

好的,所以我通过重新开始并遵循以下说明,成功地启动并运行了库:
我仍然不知道第一次出了什么问题(可能是过时的指令?),但这对我来说已经不重要了。

pip包的版本正确,路径匹配。安装Potatootils后,你能
pip列表吗
检查它是否存在吗?Potatootils 0.0.1 c:\projects\pypi\potatootils yes,就在那里,已经试过了,没用。无论如何,谢谢你的努力!