【发布时间】:2020-02-14 07:31:41
【问题描述】:
我正在尝试将 camelcase 模块导入 python:
from camelcase import CamelCase
txt = 'hello there world'
c = CamelCase()
print(c.hump(txt))
我收到一个错误:ModuleNotFoundError: No module named 'camelcase'
我也试过了:
import camelcase
txt = 'hello there world'
c = camelcase.CamelCase()
print(c.hump(txt))
同样的问题。我安装了最新版本的 pip:
--pip --version
pip 20.0.2 from C:\Users\Eryk Słowiński\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\pip (python 3.7)
而且我肯定已经安装了驼峰式
--pip freeze
appdirs==1.4.3
camelcase==0.2
importlib-metadata==1.5.0
virtualenv==20.0.3
zipp==2.2.0
我做错了什么?
【问题讨论】:
-
你能在
pip list的结果中看到camelcase -
是的,我也在点子列表中看到它。但是我想我已经找到了问题的根源(我将编辑我的帖子)。无论如何感谢您的关注
标签: python visual-studio-code module