-2

I am trying to run camelCase and install it the code I used for installing it is

   C:\Users\Your Name\AppData\Local\Programs\Python\Python36-32\Scripts>pip install camelcase

which gave me the result of

   C:\\Users\\Your Name\\AppData\\Local\\Programs\\Python\\Python36-32\\Scripts>pip install camelcase

which made me think it installed it but when I tried to import camelCase using import camelCase it gave me the result of

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'camelcase'

(I have Python 3.8.3 BTW so it already has PIP)

Trenton McKinney
  • 56,955
  • 33
  • 144
  • 158
Faith
  • 1
  • 1

2 Answers2

1

Import the camelcase package using lowercase letters. As an example:

from camelcase import CamelCase
c = CamelCase()
s = 'this is a sentence that needs camelcasing!'
print(c.hump(s))
zmike
  • 1,090
  • 10
  • 24
0

I have had the same problem. To solve this in windows:

  1. Find where the project interpreter is located, for example in Pycharm you can find it here :Settings\Project:<project_name>\Python Interpreter
  2. Open cmd and active the same pass.
  3. Try to install your package in that pass by using: pip install

That may solve the problem.