# How to use a new repository downloaded from github

**URL:** <https://discourse.jupyter.org/t/how-to-use-a-new-repository-downloaded-from-github/8870>\
**Category:** Notebook\
**Created:** [April 21, 2021, 9:09pm UTC](https://discourse.jupyter.org/t/how-to-use-a-new-repository-downloaded-from-github/8870 "2021-04-21T21:09:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![oli\_mat](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/oli_mat/32/4221_2.png) [@oli\_mat](https://discourse.jupyter.org/u/oli_mat)\
**Post date:** [April 21, 2021, 9:09pm UTC](https://discourse.jupyter.org/t/how-to-use-a-new-repository-downloaded-from-github/8870/1 "2021-04-21T21:09:03Z")

</div>

Hello,  
I am a new user of python and github.  
I want to use a new repository (module) published on github.  
I downloaded the zip folder and extracted it. , but I don’t know how to use this module with jupyter (on windows 10).  
How can I import this module into jupyter .  
Thanks!

 ![jupyter](https://canada1.discourse-cdn.com/flex031/uploads/jupyter/original/2X/3/353a654e0c5acd383e3746fe647c48207f0d9289.png)

---

<div class="post-metadata">

**Author:** ![fomightez](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/fomightez/32/495_2.png) [@fomightez](https://discourse.jupyter.org/u/fomightez)\
**Post date:** [April 22, 2021, 5:08pm UTC](https://discourse.jupyter.org/t/how-to-use-a-new-repository-downloaded-from-github/8870/2 "2021-04-22T17:08:04Z")

</div>

A lot depends on how ‘New’ it is. You don’t provide any specifics, and so it is hard to advise you?

For example, what is the name of the module or the repository?  
It may be as easy as typing the following in a notebook cell where `<module_name>` is replaced by the module name.

```auto
%pip install <module_name>
import <module_name>

```

Some module names aren’t exactly what you use in the install or import call. The correct syntax of the name will usually be shown in the documentation either at the repo or on PyPi.

---

<div class="post-metadata">

**Author:** ![oli\_mat](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/oli_mat/32/4221_2.png) [@oli\_mat](https://discourse.jupyter.org/u/oli_mat)\
**Post date:** [April 22, 2021, 10:21pm UTC](https://discourse.jupyter.org/t/how-to-use-a-new-repository-downloaded-from-github/8870/3 "2021-04-22T22:21:17Z")

</div>

> [@fomightez](#):
>
> `%pip install `

I tried some method but without success

Why it is not possible to copy and paste directly a folder from my download folder (F:/téléchargement/) to a jupyter notebook folder (…/source/repos/ for example ) ?

 ![image](https://canada1.discourse-cdn.com/flex031/uploads/jupyter/original/2X/3/36e39af551bfd3e19c75cfd77f969112906eb189.png)

This file is uploading in my drive :

> **[Google Drive: Sign-in](https://accounts.google.com/v3/signin/identifier?continue=https%3A%2F%2Fdrive.google.com%2Ffile%2Fd%2F1wpSkspTwFIfzTMfKsje2iIFsRRvzqf8q%2Fview%3Fusp%3Dsharing&followup=https%3A%2F%2Fdrive.google.com%2Ffile%2Fd%2F1wpSkspTwFIfzTMfKsje2iIFsRRvzqf8q%2Fview%3Fusp%3Dsharing&ifkv=ASKXGp0uXdy3kCSJPC-sHlONjM4uQrKbMV_qz-j1SF7P7I8ksFjJfIcO7wK1Lreyu25S4BOPXcwVbA&osid=1&passive=1209600&service=wise&flowName=GlifWebSignIn&flowEntry=ServiceLogin&dsh=S-335165674%3A1701778516960190&theme=glif)**
>
> Access Google Drive with a Google account (for personal use) or Google Workspace account (for business use).

---

<div class="post-metadata">

**Author:** ![fomightez](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/fomightez/32/495_2.png) [@fomightez](https://discourse.jupyter.org/u/fomightez)\
**Post date:** [April 23, 2021, 3:39am UTC](https://discourse.jupyter.org/t/how-to-use-a-new-repository-downloaded-from-github/8870/4 "2021-04-23T03:39:16Z")

</div>

Please when posting, put the pertinent link in the post as a link. Text as an image isn’t readily useable. You want to make it easy for people to help you. See Tim’s excellent post [Getting good answers to your questions](https://discourse.jupyter.org/t/getting-good-answers-to-your-questions/1825).

* * *

What you reference isn’t a module. Those are Python scripts as discussed in [the accompanying documentation](http://www.excamera.com/sphinx/article-ray.html), referenced from [the raytrace repo by [James Bowman](https://github.com/jamesbowman)]([GitHub - jamesbowman/raytrace: Python raytracer](https://github.com/jamesbowman/raytrace)).

Run this code below in your notebook to run the final script discussed [here](http://www.excamera.com/sphinx/article-ray.html):

```python
%pip install numpy
%pip install pillow
!curl -O https://raw.githubusercontent.com/jamesbowman/raytrace/master/rt3.py
%run rt3.py

```

You’ll then see a file `rt3.png` in your Jupyter dashboard, accessible by clicking on the `Jupyter` logo in the upper left of the screenshot you posted.

You can take the last two lines and put them in a new cell. And then edit those two lines to run the other scripts in the repository.

* * *

If your system doesn’t have `curl` try the fllowing:

```python
!wget https://raw.githubusercontent.com/jamesbowman/raytrace/master/rt3.py

```

* * *

If you prefer to use `git` and fetch all the scripts at once and run them, place this in a cell:

```python
!git clone https://github.com/jamesbowman/raytrace.git
%cd raytrace
%run rt2.py
%run rt3.py
%run rt4.py

```

The magic `%cd` command adjusts the working directory of the notebook, see [here](https://ipython.readthedocs.io/en/stable/interactive/magics.html#magic-cd). When the repository is cloned by git, the contents go into a directory with the name of repository. The initial working directory for a notebook will likely be the home directory othwerise.

---

<div class="post-metadata">

**Author:** ![oli\_mat](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/oli_mat/32/4221_2.png) [@oli\_mat](https://discourse.jupyter.org/u/oli_mat)\
**Post date:** [April 23, 2021, 11:16pm UTC](https://discourse.jupyter.org/t/how-to-use-a-new-repository-downloaded-from-github/8870/5 "2021-04-23T23:16:31Z")

</div>

Thank you @fomightez for your help !
