Closed s2t2 closed 2 years ago
Looks like this may be a possibility:
https://docs.spyder-ide.org/current/faq.html#run-terminal
Activate your conda environment by typing the following in your terminal (or Anaconda Prompt on Windows):
conda activate <ENVIRONMENT-NAME>
. Then, typespyder
to launch the version installed in that environment.
Looks like it requires a pip install spyder, but it does launch the Spyder window.
One-time environment setup:
conda create -n cosc-010-env python=3.8
conda activate cosc-010-env
# verify things are working
python --version
pip list
# install additional packages
pip install python-dotenv
pip install spyder
spyder
It does launch the Spyder program, but the console seems to have different packages installed? Maybe not what we're looking for. Maybe they just mean launch Spyder if it has already been installed in the conda environment.
If we go through Anaconda Navigator, we can create a new environment that way. Then try to launch Spyder (or VS Code?) using the selected environment.
Although I think this is the same process as installing spyder inside the environment.
We probably would still need to install packages via pip from the command line. And then activate the env and run spyder.
Let's try a new test...
conda create -n my-spyder-env python=3.8
conda activate my-spyder-env
python --v
pip list
cd ~/projects/prof-rossetti/daily-briefings-py
pip install -r requirements.txt
pip install spyder
spyder
Let Spyder open.
Select the proper repo directory from the top right corner.
From the Spyder terminal, verify:
pwd
OK so far so good.
It seems it does not respect modular invocation though.
OK nevermind about selecting the project from the top right I guess we need to "Open File" from the top left.
Then press play and see:
Bummer. We need to figure out a way to run with modular invocation. At this point it seems easier to use the real terminal to run the file.
Trying PyCharm (community version) https://www.jetbrains.com/pycharm/download/download-thanks.html?platform=mac&code=PCC
Can download a project right from Github.
It just worked great. Created a virtual env for me from the requirements.txt. Installed all packages. Ran the weather service fine.
Can install packages as well: https://www.jetbrains.com/help/pycharm/installing-uninstalling-and-upgrading-packages.html#packages-tool-window
This thread confirms PyCharm is a good IDE option. We should consider adding PyCharm as an option to the dev tools setup guide.
The integrated terminal in VS code is non-functioning / hard to configure, so we need an easier tool students can use for local development. An IDE would be fine.
PyCharm is a possibility. The TAs like Spyder. Here are some instructions we can give students for Spyder, but I need to take more time to verify we could use Spyder in conjunction with environment variables, etc. So removing this content from the COSC 010 Local Dev Setup Guide for now. TODO: add text editor / IDE instructions to that doc.