Skip to content

Instantly share code, notes, and snippets.

@greghelton
Last active September 14, 2023 19:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save greghelton/20b0d304e314b8c1f1891c3818b636a3 to your computer and use it in GitHub Desktop.
Save greghelton/20b0d304e314b8c1f1891c3818b636a3 to your computer and use it in GitHub Desktop.
Conda commands used in the book Make Python Talk

What is Anaconda?
(from wikipedia) Anaconda is a cross-platform distribution of the Python and R programming languages
for scientific computing that aims to simplify package management and deployment.

Conda is Anaconda's package management system.

To install Anaconda, go to https://www.anaconda.com/products/individual/
then choose the graphical installer and follow the instructions

Conda Command to Update Conda
$ conda update -n base -c defaults conda

Conda Command to Create a Virtual Environment named chatting
$ conda create -n chatting

Conda Command to Activate a Virtual Environment
$ conda activate chatting

Conda Command to Leave a Virtual Environment
$ conda deactivate

Run conda install and pip install commands after placing your PC in the project environement,
i.e., in the case of this book, after running
$ conda activate chatting

Conda Command to install yt
$ conda install yt

Conda Command to install pyaudio
$ conda install pyaudio

Conda Command to install Spyder
$ conda install spyder

Conda Command to launch spyder
$ spyder

Terminal Install Commands
$ pip install SpeechRecognition
$ pip install gTTS

Other helpful commands
Start Python interpreter
$ python

Leave Python interpreter
>> quit()

Version check
$ python --version

Bug encountered using pyttsx3 on Mac
Answer #2 on stackoverflow corrects the problem.
You will have to find the file nsss.py and comment one line and add another
#self = super(NSSpeechDriver, self).init()
self = objc.super(NSSpeechDriver, self).init()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment