Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issues with arch linux #10

Closed
masterchilidog opened this issue Jul 15, 2018 · 9 comments
Closed

issues with arch linux #10

masterchilidog opened this issue Jul 15, 2018 · 9 comments

Comments

@masterchilidog
Copy link

hello, i was able to try out the program on a windows 10 computer and it worked very well. however i tried using it on my arch linux machine and have been having constant issues. on the arch insallation two lines were written: one was to use pacman to install swig and espeak. this worked well and everything installed correctly. however the second command was the issue. the pip3 install command installed most of the required files however feedparser will not install and therefore it will not start the program. any help i can get to work around this issues or possibly a different way to install? thank you.

@joshuashort
Copy link
Member

I’m pretty sure feedparser is only used for reading a news feed, so if you want to get things running, you should be able to remove that import and carry on.

@masterchilidog
Copy link
Author

when i type "$ python oa.py" it returns
"Traceback (most recent call last);
File "oa.py", line 10, in
import core
File "/home/[my name]/core.py", line 8, in
import feedparser
ModuleNotFoundError: No Module named 'feedparser'

@joshuashort
Copy link
Member

Comment out or delete the line (8) in that file where it’s importing feedparser.

You seem to be using an earlier version, but feedparser would still be a problem.

@masterchilidog
Copy link
Author

i downloaded the version from this github so i figured it would be up to date? also i commented out feedparser and it told me psutil wasnt there so i commented that out too and now its telling me a bunch of stuff isnt there including pocketsphinx which i know for a fact is there cuz it downloaded correctly, but psutil and feedparser couldnt be found

@masterchilidog
Copy link
Author

masterchilidog commented Jul 15, 2018

so i think the issue is with the original pip3 install. i tried it again and the first couple packages installed but im getting this at the end. also i apologize in advance, im new to using github to comment and i dont know proper formatting but ill just paste my console error output

Installing collected packages: pocketsphinx, psutil, feedparser, cookies, responses, python-forecastio, numpy
  Running setup.py install for pocketsphinx ... error
    Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-ogd9w1rl/pocketsphinx/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-v8dbzfoa/install-record.txt --single-version-externally-managed --compile:
    running install
    running build_ext
    building 'sphinxbase._sphinxbase' extension
    swigging deps/sphinxbase/swig/sphinxbase.i to deps/sphinxbase/swig/sphinxbase_wrap.c
    swig -python -modern -threads -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/android -Ideps/sphinxbase/swig -outdir sphinxbase -o deps/sphinxbase/swig/sphinxbase_wrap.c deps/sphinxbase/swig/sphinxbase.i
    creating build
    creating build/temp.linux-x86_64-3.6
    creating build/temp.linux-x86_64-3.6/deps
    creating build/temp.linux-x86_64-3.6/deps/sphinxbase
    creating build/temp.linux-x86_64-3.6/deps/sphinxbase/src
    creating build/temp.linux-x86_64-3.6/deps/sphinxbase/src/libsphinxbase
    creating build/temp.linux-x86_64-3.6/deps/sphinxbase/src/libsphinxbase/lm
    creating build/temp.linux-x86_64-3.6/deps/sphinxbase/src/libsphinxbase/feat
    creating build/temp.linux-x86_64-3.6/deps/sphinxbase/src/libsphinxbase/util
    creating build/temp.linux-x86_64-3.6/deps/sphinxbase/src/libsphinxbase/fe
    creating build/temp.linux-x86_64-3.6/deps/sphinxbase/swig
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -fPIC -DSPHINXBASE_EXPORTS -DPOCKETSPHINX_EXPORTS -DSPHINX_DLL -DHAVE_CONFIG_H -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/android -I/usr/include/python3.6m -c deps/sphinxbase/src/libsphinxbase/lm/ngrams_raw.c -o build/temp.linux-x86_64-3.6/deps/sphinxbase/src/libsphinxbase/lm/ngrams_raw.o -Wno-unused-label -Wno-strict-prototypes -Wno-parentheses -Wno-unused-but-set-variable -Wno-unused-variable -Wno-unused-result -Wno-sign-compare -Wno-misleading-indentation
    unable to execute 'gcc': No such file or directory
    error: command 'gcc' failed with exit status 1
    
    ----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-ogd9w1rl/pocketsphinx/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-v8dbzfoa/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-ogd9w1rl/pocketsphinx/

@joshuashort
Copy link
Member

I asked about the version because that file core.py in the error log isn't around any more, and oa.py isn't the launcher script.. you seem to be using one of the packaged releases vs. the current master branch. But you're having an issue with dependencies, and that's bigger than which OA version you're using..

So, another thing to check is if you're actually running Python3 -- some distros have versions 2.x and 3.x installed, so verifypython is running the right version. If not, use python3 oa.py instead of python oa.py. That seems like part of the problem.. especially if you're installing with pip3 and python is actually 2.x.

From the log you posted, it looks like gcc isn't installed on your system. Not sure how it is on Arch, but Debian systems (or only Ubuntu?) have a package called build-essentials that includes things like gcc, make, and some other stuff for building software. You might be able to get away with simply installing the things it complains about if you can't find a similar meta package. Sometimes pip needs to compile things when installing, so start by installing gcc with your package manager.

@masterchilidog
Copy link
Author

thanks for your help. i already had python 3.6.6(i think) installed. i think the gcc was the issue. i installed that through regular pacman and then used pip3 install and it failed again so i tried running it as root with sudo and it worked so i got it up and working now. thank you again for your assistance

@masterchilidog
Copy link
Author

so now that the program is functioning correctly, and doing very well with voice recognition, whats the best way to go about adding stuff, maybe similar to stella used in the demo video.

@joshuashort
Copy link
Member

I’d recommend looking at the ‘minds’. You should be able to add new functions / expressions if you follow the pattern in them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants