Skip to content

Commit 98ed26c

Browse files
committed
Replaced conda with venv
1 parent f1837a6 commit 98ed26c

File tree

17 files changed

+235
-63
lines changed

17 files changed

+235
-63
lines changed

.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
.DS_Store
22

33
01-cancer-data-analysis/combined_data.csv
4-
01-cancer-data-analysis/combined_data_cleaned.csv
4+
01-cancer-data-analysis/combined_data_cleaned.csv
5+
6+
gh-cp-venv/

01-cancer-data-analysis/completed-notebooks/fm-ad-notebook-exploration-COMPLETED.ipynb

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"metadata": {},
4848
"source": [
4949
"### 0. Prerequisites\n",
50-
"To achieve the desired outcome of your analysis, the conda environment.yml file has installed the following packages:\n",
50+
"To achieve the desired outcome of your analysis, the venv requirements.txt file has installed the following packages:\n",
5151
"\n",
5252
"- [NumPy](https://numpy.org/): Fundamental package for numerical computing with support for large, multi-dimensional arrays and matrices, along with a collection of mathematical functions.\n",
5353
"- [pandas](https://pandas.pydata.org/): Provides high-performance, easy-to-use data structures and data analysis tools for working with structured data, such as data frames.\n",
@@ -19831,7 +19831,7 @@
1983119831
],
1983219832
"metadata": {
1983319833
"kernelspec": {
19834-
"display_name": "Python 3",
19834+
"display_name": "githubcopilotworkshop2",
1983519835
"language": "python",
1983619836
"name": "python3"
1983719837
},

01-cancer-data-analysis/fm-ad-notebook-exploration.ipynb

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"metadata": {},
4848
"source": [
4949
"### 0. Prerequisites\n",
50-
"To achieve the desired outcome of your analysis, the conda environment.yml file has installed the following packages:\n",
50+
"To achieve the desired outcome of your analysis, the venv requirements.txt file has installed the following packages:\n",
5151
"\n",
5252
"- [NumPy](https://numpy.org/): Fundamental package for numerical computing with support for large, multi-dimensional arrays and matrices, along with a collection of mathematical functions.\n",
5353
"- [pandas](https://pandas.pydata.org/): Provides high-performance, easy-to-use data structures and data analysis tools for working with structured data, such as data frames.\n",
@@ -495,7 +495,7 @@
495495
],
496496
"metadata": {
497497
"kernelspec": {
498-
"display_name": "Python 3",
498+
"display_name": "githubcopilotworkshop2",
499499
"language": "python",
500500
"name": "python3"
501501
},

03-troubleshooting-guides/README.md

+1-40
Original file line numberDiff line numberDiff line change
@@ -10,43 +10,4 @@ This document provides solutions for common issues encountered while using GitHu
1010
**Solution 2:**
1111
- Check if `"editor.inlineSuggest.enabled": false` in your settings.
1212
- If it is set to `false`, set it to `true` and GitHub Copilot should be back up again.
13-
- Reference: [Stack Overflow](https://stackoverflow.com/questions/76396755/github-copilot-does-not-suggest-anything-anymore-after-i-fiddled-around-with-vsc)
14-
15-
## Issue: Conda Env Won't Show Up in VS Code Under Kernel Selection
16-
17-
**Solution:**
18-
- Restart VS Code.
19-
20-
## Issue: Conda Env Won't Show Up in VS Code Terminal
21-
22-
**Solution 1:**
23-
- Open your terminal in VS Code.
24-
- Then within the terminal, type: `conda init`.
25-
- Close and reopen the terminal.
26-
- Use Conda normally.
27-
- Reference: [Stack Overflow](https://stackoverflow.com/questions/61986052/visual-studio-code-terminal-doesnt-activate-conda-environment)
28-
29-
**Solution 2:**
30-
- Open up your terminal.
31-
- Activate the environment by running the command: `conda activate githubcopilotworkshop`.
32-
- Start Visual Studio Code from the Anaconda/Miniconda terminal: `code`.
33-
- Reference: [Stack Overflow](https://stackoverflow.com/questions/65064740/error-when-trying-to-use-conda-on-visual-studio-code-conda-the-term-conda)
34-
35-
## Issue: SSL Connection Errors
36-
37-
**Solution:**
38-
- Refer to the [Conda documentation on SSL connection errors](https://docs.conda.io/projects/conda/en/latest/user-guide/troubleshooting.html#the-system-cannot-find-the-path-specified-on-windows:~:text=library%20load%20failed-,SSL%20connection%20errors,-Permission%20denied%20errors).
39-
40-
## Issue: Shell Commands Open from the Wrong Location
41-
42-
**Solution:**
43-
- Refer to the [Conda documentation on shell command issues](https://docs.conda.io/projects/conda/en/latest/user-guide/troubleshooting.html#shell-commands-open-from-the-wrong-location).
44-
45-
## Issue: The System Cannot Find the Path Specified on Windows
46-
47-
**Solution:**
48-
- Refer to the [Conda documentation on path issues](https://docs.conda.io/projects/conda/en/latest/user-guide/troubleshooting.html#the-system-cannot-find-the-path-specified-on-windows).
49-
50-
## More Troubleshooting Guides for Conda
51-
52-
- Visit the [Conda troubleshooting documentation](https://docs.conda.io/projects/conda/en/latest/user-guide/troubleshooting.html) for more guides.
13+
- Reference: [Stack Overflow](https://stackoverflow.com/questions/76396755/github-copilot-does-not-suggest-anything-anymore-after-i-fiddled-around-with-vsc)

04-simple-website/index.html

Whitespace-only changes.

04-simple-website/script.js

Whitespace-only changes.

04-simple-website/style.css

Whitespace-only changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Troubleshooting Guide for VS Code and Conda Issues
2+
3+
This document provides solutions for common issues encountered while using GitHub Copilot, Conda environments, and Visual Studio Code (VS Code). The troubleshooting steps include restarting VS Code, modifying settings, and utilizing command-line instructions. References to relevant discussions and documentation are provided for further assistance.
4+
5+
## Issue: GitHub Copilot Won't Complete Prompts
6+
7+
**Solution 1:**
8+
- Restart VS Code.
9+
10+
**Solution 2:**
11+
- Check if `"editor.inlineSuggest.enabled": false` in your settings.
12+
- If it is set to `false`, set it to `true` and GitHub Copilot should be back up again.
13+
- Reference: [Stack Overflow](https://stackoverflow.com/questions/76396755/github-copilot-does-not-suggest-anything-anymore-after-i-fiddled-around-with-vsc)
14+
15+
## Issue: Conda Env Won't Show Up in VS Code Under Kernel Selection
16+
17+
**Solution:**
18+
- Restart VS Code.
19+
20+
## Issue: Conda Env Won't Show Up in VS Code Terminal
21+
22+
**Solution 1:**
23+
- Open your terminal in VS Code.
24+
- Then within the terminal, type: `conda init`.
25+
- Close and reopen the terminal.
26+
- Use Conda normally.
27+
- Reference: [Stack Overflow](https://stackoverflow.com/questions/61986052/visual-studio-code-terminal-doesnt-activate-conda-environment)
28+
29+
**Solution 2:**
30+
- Open up your terminal.
31+
- Activate the environment by running the command: `conda activate githubcopilotworkshop`.
32+
- Start Visual Studio Code from the Anaconda/Miniconda terminal: `code`.
33+
- Reference: [Stack Overflow](https://stackoverflow.com/questions/65064740/error-when-trying-to-use-conda-on-visual-studio-code-conda-the-term-conda)
34+
35+
## Issue: SSL Connection Errors
36+
37+
**Solution:**
38+
- Refer to the [Conda documentation on SSL connection errors](https://docs.conda.io/projects/conda/en/latest/user-guide/troubleshooting.html#the-system-cannot-find-the-path-specified-on-windows:~:text=library%20load%20failed-,SSL%20connection%20errors,-Permission%20denied%20errors).
39+
40+
## Issue: Shell Commands Open from the Wrong Location
41+
42+
**Solution:**
43+
- Refer to the [Conda documentation on shell command issues](https://docs.conda.io/projects/conda/en/latest/user-guide/troubleshooting.html#shell-commands-open-from-the-wrong-location).
44+
45+
## Issue: The System Cannot Find the Path Specified on Windows
46+
47+
**Solution:**
48+
- Refer to the [Conda documentation on path issues](https://docs.conda.io/projects/conda/en/latest/user-guide/troubleshooting.html#the-system-cannot-find-the-path-specified-on-windows).
49+
50+
## More Troubleshooting Guides for Conda
51+
52+
- Visit the [Conda troubleshooting documentation](https://docs.conda.io/projects/conda/en/latest/user-guide/troubleshooting.html) for more guides.
File renamed without changes.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
## Pre-Workshop Checklist
2+
3+
Before attending the workshop, please ensure that you have the required prerequisites installed and configured properly. Follow the steps below to verify your setup.
4+
5+
### Repository Update
6+
7+
Make sure that you have cloned the repository. You can see instructions on how to do so on the [Getting Started](../README.md#getting-started) section of main page of this repository.
8+
9+
If you have already done that, ensure you have the latest content from the repository.
10+
11+
1. Open your terminal and navigate to the directory where you have cloned the repository.
12+
2. Run the following command to update your remote references:
13+
```bash
14+
git remote update
15+
```
16+
3. Check the status of your branch with this command:
17+
```bash
18+
git status -uno
19+
```
20+
- If your branch is up to date, you will see: ```Your branch is up to date with 'origin/main'.```
21+
- If your branch is not up to date, you will see a message like: ```Your branch is behind 'origin/main' by X commits...```
22+
4. If your branch is behind, update it with:
23+
```bash
24+
git pull
25+
```
26+
27+
### Conda Installation
28+
29+
Verify that Conda is installed and you can activate environments.
30+
31+
1. Check the Conda version:
32+
```bash
33+
conda --version
34+
```
35+
- You should see an output similar to:
36+
```
37+
conda X.Y.Z
38+
```
39+
- Example:
40+
41+
<img src="../assets/conda-version.jpg" alt="Conda version" width="300">
42+
43+
2. Test environment activation:
44+
- Activate the base Conda environment:
45+
```bash
46+
conda activate
47+
```
48+
- You should see `(base)` appended before your username in the terminal.
49+
- Example:
50+
51+
<img src="../assets/conda-activate.jpg" alt="Base Environment Activation" width="300">
52+
- Deactivate the base Conda environment:
53+
```bash
54+
conda deactivate
55+
```
56+
57+
This checklist will help ensure that you have the necessary setup for a smooth workshop experience. If you encounter any issues, please check out the [Troubleshooting Guide](../03-troubleshooting-guides/README.md) or reach out to the workshop organizers for further assistance.

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ You **MUST** pre-install and obtain access to the following before the start of
1515

1616

1717
- [Visual Studio Code](https://code.visualstudio.com/)
18-
- [Conda](https://conda.io/projects/conda/en/latest/user-guide/install/index.html)
18+
- [Venv](https://docs.python.org/3/library/venv.html)
1919
- [GitHub account](https://github.com/)
2020
- [GitHub Copilot](https://github.com/features/copilot)
2121
- [GitHub Copilot Visual Studio Extension](https://marketplace.visualstudio.com/items?itemName=GitHub.copilotvs)

github-copilot-ppt-v1.pptx

-724 KB
Binary file not shown.

pre-workshop-checklist/README.md

+35-17
Original file line numberDiff line numberDiff line change
@@ -24,34 +24,52 @@ If you have already done that, ensure you have the latest content from the repos
2424
git pull
2525
```
2626

27-
### Conda Installation
27+
### Python and Virtual Environment Setup
2828

29-
Verify that Conda is installed and you can activate environments.
29+
Verify that Python is installed and you can create and activate virtual environments.
3030

31-
1. Check the Conda version:
31+
1. Check the Python version:
3232
```bash
33-
conda --version
33+
python --version
3434
```
3535
- You should see an output similar to:
3636
```
37-
conda X.Y.Z
37+
Python 3.X.Y
3838
```
39-
- Example:
39+
- Make sure you have Python 3.8 or newer installed
4040

41-
<img src="../assets/conda-version.jpg" alt="Conda version" width="300">
42-
43-
2. Test environment activation:
44-
- Activate the base Conda environment:
41+
2. Test virtual environment creation and activation:
42+
- Create a test virtual environment:
4543
```bash
46-
conda activate
44+
python -m venv test-env
4745
```
48-
- You should see `(base)` appended before your username in the terminal.
49-
- Example:
46+
- Activate the virtual environment:
5047

51-
<img src="../assets/conda-activate.jpg" alt="Base Environment Activation" width="300">
52-
- Deactivate the base Conda environment:
48+
On Windows:
49+
```bash
50+
test-env\Scripts\activate
51+
```
52+
53+
On MacOS/Linux:
54+
```bash
55+
source test-env/bin/activate
56+
```
57+
- You should see `(test-env)` appended before your username in the terminal.
58+
59+
- Verify pip is available:
60+
```bash
61+
pip --version
62+
```
63+
64+
- Deactivate the virtual environment:
65+
```bash
66+
deactivate
67+
```
68+
69+
- Clean up the test environment:
5370
```bash
54-
conda deactivate
71+
rm -rf test-env # On MacOS/Linux
72+
rmdir /s /q test-env # On Windows
5573
```
5674

57-
This checklist will help ensure that you have the necessary setup for a smooth workshop experience. If you encounter any issues, please check out the [Troubleshooting Guide](../03-troubleshooting-guides/README.md) or reach out to the workshop organizers for further assistance.
75+
This checklist will help ensure that you have the necessary setup for a smooth workshop experience. If you encounter any issues, please check out the [Troubleshooting Guide](../03-troubleshooting-guides/README.md) or reach out to the workshop organizers for further assistance.

venv-environment/README.md

+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Setting Up a Python Virtual Environment Using `venv`
2+
3+
This guide will help you set up a Python virtual environment using `venv` and the `requirements.txt` file provided in this GitHub repository.
4+
5+
## Prerequisites
6+
7+
1. **Install Python**
8+
9+
Ensure you have Python 3.8 or newer installed. You can download Python from the [official Python website](https://www.python.org/downloads/).
10+
11+
- [MacOS](https://www.python.org/downloads/macos/)
12+
- [Windows](https://www.python.org/downloads/windows/)
13+
- [Linux](https://www.python.org/downloads/source/) (or use your distribution's package manager)
14+
15+
2. **Clone the repository**
16+
17+
Ensure you have cloned the repository by following the steps in the [Getting Started section of the main README](../README.md#getting-started) of this repo.
18+
19+
Once you have cloned the repo, open up your terminal to navigate to the directory of the repo in your local machine.
20+
21+
```bash
22+
cd class-workshop-researchdev-copilot
23+
```
24+
25+
## Steps
26+
27+
1. **Create the virtual environment**
28+
29+
Create a new virtual environment in a directory named `gh-cp-venv`:
30+
31+
```bash
32+
python -m venv gh-cp-venv
33+
```
34+
35+
2. **Activate the virtual environment**
36+
37+
Activate the virtual environment using the appropriate command for your operating system:
38+
39+
On Windows:
40+
```bash
41+
gh-cp-venv\Scripts\activate
42+
```
43+
44+
On MacOS/Linux:
45+
```bash
46+
source gh-cp-venv/bin/activate
47+
```
48+
49+
3. **Install dependencies**
50+
51+
Install the required packages using pip and the requirements.txt file:
52+
53+
```bash
54+
pip install -r requirements.txt
55+
```
56+
57+
4. **Verify the Installation**
58+
59+
To ensure that all the packages are installed correctly, you can list the installed packages:
60+
61+
```bash
62+
pip list
63+
```
64+
65+
4. **Complete**
66+
67+
Now you should be ready to use your newly created virtual environment in VS Code!
68+
69+
VS Code should automatically detect your virtual environment. You can select it as your Python interpreter by:
70+
1. Opening the Command Palette (Ctrl+Shift+P or Cmd+Shift+P)
71+
2. Typing "Python: Select Interpreter"
72+
3. Choosing the interpreter from the `gh-cp-venv` directory

venv-environment/requirements.txt

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
python==3.10
2+
numpy
3+
pandas
4+
matplotlib
5+
seaborn
6+
scikit-learn
7+
awscli
8+
ipykernel
9+
boto3
10+
notebook

0 commit comments

Comments
 (0)