Comments (6)
Getting the same error here
from 01.
I see that you're using python 3.9, 01 works best with python 3.11. You can use pyenv
to install python3.11, then try again. I bet that fixes your issue here. I bet pyaudio needs a more recent python too
from 01.
I encountered the same issue, and Ty was right. To resolve it, you need to use Python 3.11.
Here's what I did:
- Clone the repository
git clone https://github.com/OpenInterpreter/01
- Install pyenv and then Python 3.11 using pyenv:
brew update
brew install pyenv
pyenv install 3.11.0
- Navigate to 01/software and set Python 3.11 as the local version:
cd 01/software
pyenv local 3.11.0
- Initialize the project with Python version 3.11.0:
poetry env use 3.11.0
poetry install
- Then:
export OPENAI_API_KEY=sk...
poetry run 01
Regarding Python versions... let's just say it's complicated.
from 01.
Thanks for bringing this up. It's on our list of issues to fix. I will comment back here when fixed.
from 01.
Followed every step, getting similar/same error:
`
Installing the current project: 01OS (0.0.13)
(311) spence@Peri-XL software % poetry run 01
○
Starting...
Could not import the PyAudio C module 'pyaudio._portaudio'.
╭────────────────────── Traceback (most recent call last) ───────────────────────╮
│ /Users/spence/Library/CloudStorage/Dropbox/Github/01/software/start.py:44 in │
│ run │
│ │
│ 41 │ │ │ local: bool = typer.Option(False, "--local", help="Use recom │
│ 42 │ │ ): │
│ 43 │ │
│ ❱ 44 │ _run( │
│ 45 │ │ server=server, │
│ 46 │ │ server_host=server_host, │
│ 47 │ │ server_port=server_port, │
│ │
│ ╭────────────── locals ──────────────╮ │
│ │ client = False │ │
│ │ client_type = 'auto' │ │
│ │ context_window = 2048 │ │
│ │ expose = False │ │
│ │ llm_service = 'litellm' │ │
│ │ llm_supports_functions = False │ │
│ │ llm_supports_vision = False │ │
│ │ local = False │ │
│ │ max_tokens = 4096 │ │
│ │ model = 'gpt-4' │ │
│ │ server = False │ │
│ │ server_host = '0.0.0.0' │ │
│ │ server_port = 10001 │ │
│ │ server_url = None │ │
│ │ stt_service = 'openai' │ │
│ │ temperature = 0.8 │ │
│ │ tts_service = 'openai' │ │
│ │ tunnel_service = 'ngrok' │ │
│ ╰────────────────────────────────────╯ │
│ │
│ /Users/spence/Library/CloudStorage/Dropbox/Github/01/software/start.py:138 in │
│ _run │
│ │
│ 135 │ │ │ │ except FileNotFoundError: │
│ 136 │ │ │ │ │ client_type = "linux" │
│ 137 │ │ │
│ ❱ 138 │ │ module = importlib.import_module(f".clients.{client_type}.device │
│ 139 │ │ client_thread = threading.Thread(target=module.main, args=[serve │
│ 140 │ │ client_thread.start() │
│ 141 │
│ │
│ ╭────────────────────────────────── locals ──────────────────────────────────╮ │
│ │ client = True │ │
│ │ client_type = 'mac' │ │
│ │ context_window = 2048 │ │
│ │ expose = False │ │
│ │ handle_exit = <function _run..handle_exit at │ │
│ │ 0x14dabb9c0> │ │
│ │ llm_service = 'litellm' │ │
│ │ llm_supports_functions = False │ │
│ │ llm_supports_vision = False │ │
│ │ local = False │ │
│ │ loop = <_UnixSelectorEventLoop running=True closed=False │ │
│ │ debug=False> │ │
│ │ max_tokens = 4096 │ │
│ │ model = 'gpt-4' │ │
│ │ server = True │ │
│ │ server_host = '0.0.0.0' │ │
│ │ server_port = 10001 │ │
│ │ server_thread = <Thread(Thread-8 (run_until_complete), started │ │
│ │ 13102145536)> │ │
│ │ server_url = '0.0.0.0:10001' │ │
│ │ stt_service = 'openai' │ │
│ │ system_type = 'Darwin' │ │
│ │ temperature = 0.8 │ │
│ │ tts_service = 'openai' │ │
│ │ tunnel_service = 'ngrok' │ │
│ ╰────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /Users/spence/opt/anaconda3/envs/311/lib/python3.11/importlib/init.py:126 │
│ in import_module │
│ │
│ 123 │ │ │ if character != '.': │
│ 124 │ │ │ │ break │
│ 125 │ │ │ level += 1 │
│ ❱ 126 │ return _bootstrap._gcd_import(name[level:], package, level) │
│ 127 │
│ 128 │
│ 129 _RELOADING = {} │
│ │
│ ╭───────────── locals ──────────────╮ │
│ │ character = 'c' │ │
│ │ level = 1 │ │
│ │ name = '.clients.mac.device' │ │
│ │ package = 'source' │ │
│ ╰───────────────────────────────────╯ │
│ in _gcd_import:1204 │
│ ╭─────────────── locals ────────────────╮ │
│ │ level = 1 │ │
│ │ name = 'source.clients.mac.device' │ │
│ │ package = 'source' │ │
│ ╰───────────────────────────────────────╯ │
│ in find_and_load:1176 │
│ ╭──────────────────── locals ─────────────────────╮ │
│ │ import = <function _gcd_import at 0x10d24fd80> │ │
│ │ module = <object object at 0x10d284050> │ │
│ │ name = 'source.clients.mac.device' │ │
│ ╰─────────────────────────────────────────────────╯ │
│ in find_and_load_unlocked:1147 │
│ ╭────────────────────────────────── locals ──────────────────────────────────╮ │
│ │ child = 'device' │ │
│ │ import = <function _gcd_import at 0x10d24fd80> │ │
│ │ name = 'source.clients.mac.device' │ │
│ │ parent = 'source.clients.mac' │ │
│ │ parent_module = <module 'source.clients.mac' from │ │
│ │ '/Users/spence/Library/CloudStorage/Dropbox/Github/01/sof… │ │
│ │ parent_spec = ModuleSpec(name='source.clients.mac', │ │
│ │ loader=<_frozen_importlib_external.SourceFileLoader object │ │
│ │ at 0x14dac7a90>, │ │
│ │ origin='/Users/spence/Library/CloudStorage/Dropbox/Github… │ │
│ │ submodule_search_locations=['/Users/spence/Library/CloudS… │ │
│ │ path = [ │ │
│ │ │ │ │
│ │ '/Users/spence/Library/CloudStorage/Dropbox/Github/01/sof… │ │
│ │ ] │ │
│ │ spec = ModuleSpec(name='source.clients.mac.device', │ │
│ │ loader=<_frozen_importlib_external.SourceFileLoader object │ │
│ │ at 0x14dad4410>, │ │
│ │ origin='/Users/spence/Library/CloudStorage/Dropbox/Github… │ │
│ ╰────────────────────────────────────────────────────────────────────────────╯ │
│ in _load_unlocked:690 │
│ ╭────────────────────────────────── locals ──────────────────────────────────╮ │
│ │ module = <module 'source.clients.mac.device' from │ │
│ │ '/Users/spence/Library/CloudStorage/Dropbox/Github/01/software/s… │ │
│ │ spec = ModuleSpec(name='source.clients.mac.device', │ │
│ │ loader=<_frozen_importlib_external.SourceFileLoader object at │ │
│ │ 0x14dad4410>, │ │
│ │ origin='/Users/spence/Library/CloudStorage/Dropbox/Github/01/sof… │ │
│ ╰────────────────────────────────────────────────────────────────────────────╯ │
│ in exec_module:940 │
│ ╭────────────────────────────────── locals ──────────────────────────────────╮ │
│ │ code = <code object at 0x14daa0be0, file │ │
│ │ "/Users/spence/Library/CloudStorage/Dropbox/Github/01/software/s… │ │
│ │ line 1> │ │
│ │ module = <module 'source.clients.mac.device' from │ │
│ │ '/Users/spence/Library/CloudStorage/Dropbox/Github/01/software/s… │ │
│ │ self = <_frozen_importlib_external.SourceFileLoader object at │ │
│ │ 0x14dad4410> │ │
│ ╰────────────────────────────────────────────────────────────────────────────╯ │
│ in _call_with_frames_removed:241 │
│ ╭────────────────────────────────── locals ──────────────────────────────────╮ │
│ │ args = ( │ │
│ │ │ <code object at 0x14daa0be0, file │ │
│ │ "/Users/spence/Library/CloudStorage/Dropbox/Github/01/software/sou… │ │
│ │ line 1>, │ │
│ │ │ { │ │
│ │ │ │ 'name': 'source.clients.mac.device', │ │
│ │ │ │ 'doc': None, │ │
│ │ │ │ 'package': 'source.clients.mac', │ │
│ │ │ │ 'loader': <_frozen_importlib_external.SourceFileLoader │ │
│ │ object at 0x14dad4410>, │ │
│ │ │ │ 'spec': ModuleSpec(name='source.clients.mac.device', │ │
│ │ loader=<_frozen_importlib_external.SourceFileLoader object at │ │
│ │ 0x14dad4410>, │ │
│ │ origin='/Users/spence/Library/CloudStorage/Dropbox/Github/01/softw… │ │
│ │ │ │ 'file': │ │
│ │ '/Users/spence/Library/CloudStorage/Dropbox/Github/01/software/sou… │ │
│ │ │ │ 'cached': │ │
│ │ '/Users/spence/Library/CloudStorage/Dropbox/Github/01/software/sou… │ │
│ │ │ │ 'builtins': { │ │
│ │ │ │ │ 'name': 'builtins', │ │
│ │ │ │ │ 'doc': 'Built-in functions, types, exceptions, and │ │
│ │ other objects.\n\nThis module provides '+346, │ │
│ │ │ │ │ 'package': '', │ │
│ │ │ │ │ 'loader': <class │ │
│ │ '_frozen_importlib.BuiltinImporter'>, │ │
│ │ │ │ │ 'spec': ModuleSpec(name='builtins', loader=<class │ │
│ │ '_frozen_importlib.BuiltinImporter'>, origin='built-in'), │ │
│ │ │ │ │ 'build_class': , │ │
│ │ │ │ │ 'import': , │ │
│ │ │ │ │ 'abs': , │ │
│ │ │ │ │ 'all': , │ │
│ │ │ │ │ 'any': , │ │
│ │ │ │ │ ... +147 │ │
│ │ │ │ } │ │
│ │ │ } │ │
│ │ ) │ │
│ │ f = │ │
│ │ kwds = {} │ │
│ ╰────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /Users/spence/Library/CloudStorage/Dropbox/Github/01/software/source/clients/m │
│ ac/device.py:1 in │
│ │
│ ❱ 1 from ..base_device import Device │
│ 2 │
│ 3 device = Device() │
│ 4 │
│ │
│ /Users/spence/Library/CloudStorage/Dropbox/Github/01/software/source/clients/b │
│ ase_device.py:8 in │
│ │
│ 5 import asyncio │
│ 6 import threading │
│ 7 import os │
│ ❱ 8 import pyaudio │
│ 9 from starlette.websockets import WebSocket │
│ 10 from queue import Queue │
│ 11 from pynput import keyboard │
│ │
│ ╭────────────────────────────────── locals ──────────────────────────────────╮ │
│ │ asyncio = <module 'asyncio' from │ │
│ │ '/Users/spence/opt/anaconda3/envs/311/lib/python3.11/asynci… │ │
│ │ load_dotenv = <function load_dotenv at 0x10e50f060> │ │
│ │ os = <module 'os' (frozen)> │ │
│ │ threading = <module 'threading' from │ │
│ │ '/Users/spence/opt/anaconda3/envs/311/lib/python3.11/thread… │ │
│ ╰────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /Users/spence/opt/anaconda3/envs/311/lib/python3.11/site-packages/pyaudio/in │
│ it.py:111 in │
│ │
│ 108 import warnings │
│ 109 │
│ 110 try: │
│ ❱ 111 │ import pyaudio._portaudio as pa │
│ 112 except ImportError: │
│ 113 │ print("Could not import the PyAudio C module 'pyaudio.portaudio'." │
│ 114 │ raise │
│ │
│ ╭────────────────────────────────── locals ──────────────────────────────────╮ │
│ │ locale = <module 'locale' from │ │
│ │ '/Users/spence/opt/anaconda3/envs/311/lib/python3.11/locale.py… │ │
│ │ warnings = <module 'warnings' from │ │
│ │ '/Users/spence/opt/anaconda3/envs/311/lib/python3.11/warnings.… │ │
│ ╰────────────────────────────────────────────────────────────────────────────╯ │
╰────────────────────────────────────────────────────────────────────────────────╯
ImportError:
dlopen(/Users/spence/opt/anaconda3/envs/311/lib/python3.11/site-packages/pyaudio/
portaudio.cpython-311-darwin.so, 0x0002): symbol not found in flat namespace
'_PaMacCore_SetupChannelMap'
INFO: Started server process [52694]
INFO: Waiting for application startup.
Ready.
INFO: Application startup complete.
INFO: Uvicorn running on http://0.0.0.0:10001 (Press CTRL+C to quit)
`
I did get it working for a brief period on 3.9, but couldn't get it to actually work but couldn't get the audio to transcribe, now just can't get it working at all
from 01.
You might have already tried this, but can you confirm that this doesn't work?
pip install --upgrade pyaudio
If that doesn't work, try this:
pip uninstall pyaudio
pip install pyaudio
And if that still doesn't work, try:
brew uninstall portaudio
brew install portaudio
pip install pyaudio --global-option="build_ext" --global-option="-I/usr/local/include" --global-option="-L/usr/local/lib"
from 01.
Related Issues (20)
- while running zero one in Ubuntu Linux, getting error given HOT 3
- Asyncio Queue Bug
- GPT-4 change to GPT 3.5 Turbo as a default model HOT 2
- ngrok and connection to 01-Light HOT 2
- `CancelledError` Exception on Boot
- How to run with Humane AI Pin ? HOT 1
- Question about audio format for websocket HOT 1
- Task Persistence and Integrations
- "Let me know what you'd like to do next" repeats after answering the question and doesnt stop HOT 6
- Runs infinitely on local mode HOT 4
- I am the last step to add groq llm to 01 .. But I tried to fix this lot. I don't know how to fix this.
- Inconsistent Model Specification Behavior
- How to change openai's apikey settings HOT 2
- Ive tried for the last day to run this on M5 cardputer I cannot seem to figure it out
- Litellm/01 is unable to connect to non-openAI providers. HOT 12
- I'm not getting any response after recording.
- error: failed to run custom build command for whisper-rs-sys v0.8.0 HOT 1
- Can't clone repo HOT 2
- 01os installation: HOT 2
- Exception in thread Thread-7 (run_until_complete):
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from 01.