camel
camel copied to clipboard
cant seem to start
(camel) C:\Users\joshu\Documents\_aipython\_useful\CAMEL agnet\camel\camel\agents>python role_playing.py
Traceback (most recent call last):
File "C:\Users\joshu\Documents\_aipython\_useful\CAMEL agnet\camel\camel\agents\role_playing.py", line 8, in <module>
from .chat_agent import ChatAgent
ImportError: attempted relative import with no known parent package
any help would be good.
Hi @joshfryart ! Please install the package with pip install -e .
. It is not supposed to be used from within the repository.
Also @joshfryart thank you for putting our project into the forlder "_useful". We appreciate it!
I did run pip install -e . and it still has the same issue :/ hmmmmm
Not sure if this is a path problem in Windows. We will look into it. Thanks for reporting it @joshfryart
Similar here (Mac),
Successfully built camel
Successfully installed camel-0.0.1
(camel) moses@MosesMoses ~/imaginativereasoning/camel/camel/agents (drafting)$ python role_playing.py
Traceback (most recent call last):
File "/Users/moses/imaginativereasoning/camel/camel/agents/role_playing.py", line 7, in
I went for https://iq-inc.com/importerror-attempted-relative-import/ but it did not work out,
Oh, I see the problem that you are having. You should run the role_playing.py under the example/ai_society folder. Sorry for the confusing naming of the files.
On Mon 17. Apr 2023 at 22:33, 7Moses @.***> wrote:
Similar here (Mac),
Successfully built camel
Successfully installed camel-0.0.1
(camel) @.*** ~/imaginativereasoning/camel/camel/agents (drafting)$ python role_playing.py Traceback (most recent call last): File "/Users/moses/imaginativereasoning/camel/camel/agents/role_playing.py", line 7, in from .chat_agent import ChatAgent ImportError: attempted relative import with no known parent package
I went for https://iq-inc.com/importerror-attempted-relative-import/ but it did not work out,
— Reply to this email directly, view it on GitHub https://github.com/lightaime/camel/issues/91#issuecomment-1511969740, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFUJTYFDO7TR32K2SNPFS6LXBWLHVANCNFSM6AAAAAAXAHO6GI . You are receiving this because you commented.Message ID: @.***>
@joshfryart @7Moses let me if it works by run the script examples/ai_society/role_playing.py. Thanks again for reporting this.
File "C:\Users\joshu\Documents\_aipython\_useful\camel\examples\ai_society\role_playing.py", line 3, in <module>
from camel.agents import RolePlaying
ModuleNotFoundError: No module named 'camel'
@joshfryart please try:
- pip install -e .
- run the script examples/ai_society/role_playing.py
Thank you for getting back to me, appreciated
(Just in case: I did not use conda, see below for my .pyenv set up, )
I ran $ python /examples/ai_society/role_playing.py like this
(camel) moses@MosesMoses ~/imaginativereasoning/camel/examples/ai_society (drafting)$ python /examples/ai_society/role_playing.py
Nope, No such file,
(camel) moses@MosesMoses ~/imaginativereasoning/camel/examples/ai_society (drafting)$ python /Users/moses/imaginativereasoning/camel/examples/ai_society/role_playing.py
Traceback (most recent call last):
File "/Users/moses/imaginativereasoning/camel/examples/ai_society/role_playing.py", line 49, in
(camel) moses@MosesMoses ~/imaginativereasoning/camel/examples/ai_society (drafting)$
Best to you,
@joshfryart please try:
1. pip install -e . 2. run the script examples/ai_society/role_playing.py
this worked. Thanks for missing my oversight. Having fun now 👯
@joshfryart enjoy!
I am curious why it doesn't work when I followed Install CAMEL from source with poetry (Recommended):
? I can see camel
exist in python3 console, but not able to run python3 examples/ai_society/role_playing.py
which gave me no module named camel