我正在尝试运行camelCase并按照我用于安装它的代码进行安装
C:\Users\Your Name\AppData\Local\Programs\Python\Python36-32\Scripts>pip install camelcase
这给了我
的结果 C:\\Users\\Your Name\\AppData\\Local\\Programs\\Python\\Python36-32\\Scripts>pip install camelcase
这让我觉得它已经安装了,但是当我尝试使用import camelCase
导入camelCase时
它给了我
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'camelcase'
(我有Python 3.8.3 BTW,所以它已经有了PIP)
答案 0 :(得分:1)
使用小写字母导入camelcase
软件包。例如:
from camelcase import CamelCase
c = CamelCase()
s = 'this is a sentence that needs camelcasing!'
print(c.hump(s))