Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@pyk
Last active January 30, 2020 08:54
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 pyk/09e2f474ddd420718ba2959075e5745f to your computer and use it in GitHub Desktop.
Save pyk/09e2f474ddd420718ba2959075e5745f to your computer and use it in GitHub Desktop.
Setup Python development in Windows 10

Python Setup

Download and install Python 3.8.

Open the folder using VSCode.

Open the VSCode terminal using CTRL + J.

Then create new virtualenv using the following command:

python -m venv venv

This will create new folder named venv.

Then activate the virtualenv using the following command:

.\venv\Scripts\activate.bat

Now you can use pip to install the python package.

Jupyter Notebook Setup

Once the virtualenv is activated, you can install the jupyter notebook using the following command:

pip install jupyter

Then you can run the jupyter notebook using the following command:

jupyter notebook

CUDA Setup

To check wether CUDA is installed or not run the following command:

nvcc --version

If installed it should print the following information:

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Sun_Jul_28_19:12:52_Pacific_Daylight_Time_2019
Cuda compilation tools, release 10.1, V10.1.243

If not then you need to download and install CUDA.

PyTorch Setup

Run the following command to install PyTorch:

pip install torch===1.4.0 torchvision===0.5.0 -f https://download.pytorch.org/whl/torch_stable.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment