# Invalid syntax error on Jupyter Notebook

**URL:** <https://discuss.python.org/t/invalid-syntax-error-on-jupyter-notebook/7394>\
**Category:** Python Help\
**Tags:** help\
**Created:** [February 26, 2021, 7:22am UTC](https://discuss.python.org/t/invalid-syntax-error-on-jupyter-notebook/7394 "2021-02-26T07:22:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Obncube](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/obncube/32/3606_2.png) [@Obncube](https://discuss.python.org/u/Obncube)\
**Post date:** [February 26, 2021, 7:22am UTC](https://discuss.python.org/t/invalid-syntax-error-on-jupyter-notebook/7394/1 "2021-02-26T07:22:46Z")

</div>

![python](https://us1.discourse-cdn.com/flex002/uploads/python1/original/2X/1/1d1ba62200ae7dfc1f278b87a34b14bcf6a6283c.png)

Good morning, i am getting this error while running this code on Jupyter Notebook 6.1.4, i am using Python 3. I am a new comer in Python coding please help

---

<div class="post-metadata">

**Author:** ![tjol](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/tjol/32/3414_2.png) [@tjol](https://discuss.python.org/u/tjol)\
**Post date:** [February 26, 2021, 7:30am UTC](https://discuss.python.org/t/invalid-syntax-error-on-jupyter-notebook/7394/2 "2021-02-26T07:30:25Z")

</div>

You need parentheses around the argument to `print`, just like any other function

```auto
print("Epoch {0} complete".format(j))

```

(I’m guessing you copied this code from some old codebase or tutorial from back in the Python 2.x days?)

---

<div class="post-metadata">

**Author:** ![Obncube](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/obncube/32/3606_2.png) [@Obncube](https://discuss.python.org/u/Obncube)\
**Post date:** [February 26, 2021, 7:32am UTC](https://discuss.python.org/t/invalid-syntax-error-on-jupyter-notebook/7394/3 "2021-02-26T07:32:15Z")

</div>

Yes thank you, i was following a You tube tutorial

---

<div class="post-metadata">

**Author:** ![steven.daprano](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/steven.daprano/32/1083_2.png) [@steven.daprano](https://discuss.python.org/u/steven.daprano)\
**Post date:** [February 26, 2021, 8:51am UTC](https://discuss.python.org/t/invalid-syntax-error-on-jupyter-notebook/7394/4 "2021-02-26T08:51:48Z")

</div>

Old tutorials from Python 2 will not need parentheses when you call  
print. Python 3 requires them.

---

<div class="post-metadata">

**Author:** ![Obncube](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/obncube/32/3606_2.png) [@Obncube](https://discuss.python.org/u/Obncube)\
**Post date:** [February 26, 2021, 9:48am UTC](https://discuss.python.org/t/invalid-syntax-error-on-jupyter-notebook/7394/5 "2021-02-26T09:48:59Z")

</div>

> > > import network  
> > > net = network.Network([784, 30, 10])

I have hit another brick wall, i ran the above code and got the following error

ModuleNotFoundError Traceback (most recent call last)  
 in   
----\> 1 import network  
2 net = network.Network([784, 30, 10])

ModuleNotFoundError: No module named ‘network’
