【发布时间】:2021-03-15 18:03:10
【问题描述】:
当我尝试在本地安装我的库并对其进行测试时,它显示为已安装:
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'
我做错了什么?
编辑:pip 和 python 具有相同的版本(3.7)并且它们的路径匹配。
当我使用 pip list 时,库会显示出来。
【问题讨论】:
-
你可以
pip list在你安装了potatoutils之后检查它是否存在吗? -
potatoutils 0.0.1 c:\projects\pypi\potatoutils 是的,它就在那里。