elevenlabs / elevenlabs-python

The official Python API for ElevenLabs Text to Speech.
https://elevenlabs.io/docs/api-reference/getting-started
MIT License
2.2k stars 255 forks source link

ModuleNotFoundError: No module named 'elevenlabs' #340

Open kofboy2000 opened 3 months ago

kofboy2000 commented 3 months ago
(.venv) `my local path...` >pip show elevenlabs
Name: elevenlabs
Version: 1.6.1
Summary:
Home-page:
Author:
Author-email:
License: MIT
Location: `my local path...`\.venv\lib\site-packages
Requires: httpx, pydantic, pydantic-core, requests, typing_extensions, websockets
Required-by:

I do have a elevenlabs package like above. But whenever I test sample code from my environment, it doesn't work and show ModuleNotFoundError :(

from elevenlabs import play
from elevenlabs.client import ElevenLabs

client = ElevenLabs(
  api_key="..."
)

audio = client.generate(
  text="Hello! 你好! Hola! नमस्ते! Bonjour! こんにちは! مرحبا! 안녕하세요! Ciao! Cześć! Привіт! வணக்கம்!",
  voice="Rachel",
  model="eleven_multilingual_v2"
)
play(audio)
Traceback (most recent call last):
  File "`my local path...`\main.py", line 1, in <module>
    from elevenlabs import play
ModuleNotFoundError: No module named 'elevenlabs'

I checked all the path and elevenlabs lib is installed in my envorinment. Could you please help me to resolve issue?