# Problem with Building Neo4j Applications with Python

**URL:** https://community.neo4j.com/t/problem-with-building-neo4j-applications-with-python/58276
**Category:** General
**Tags:** migrated
**Created:** [January 6, 2023, 3:49pm UTC](https://community.neo4j.com/t/problem-with-building-neo4j-applications-with-python/58276 "2023-01-06T15:49:05Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![PaulM](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/paulm/32/33063_2.png) [@PaulM](https://community.neo4j.com/u/PaulM)
#### Post date: [January 6, 2023, 3:49pm UTC](https://community.neo4j.com/t/problem-with-building-neo4j-applications-with-python/58276/1 "2023-01-06T15:49:05Z")

</div>

I'm trying to run the first exercise in the course and I can't get this to run:

pytest tests/01\_connect\_to\_neo4j\_\_test.py

I get:

MM226508-PC:app-python-main morawski$ pytest tests/01\_connect\_to\_neo4j\_\_test.py

-bash: pytest: command not found

Any help appreciated,

Paul

---

<div class="post-metadata">

### Author: ![jalakoo](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/jalakoo/32/27445_2.png) [@jalakoo](https://community.neo4j.com/u/jalakoo)
#### Post date: [January 6, 2023, 10:21pm UTC](https://community.neo4j.com/t/problem-with-building-neo4j-applications-with-python/58276/2 "2023-01-06T22:21:30Z")

</div>

Yup, that's the result I get. Glad it's working for you now. If you figure out what the hiccup was, post here. Curious to know what the cause was.

---

<div class="post-metadata">

### Author: ![jalakoo](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/jalakoo/32/27445_2.png) [@jalakoo](https://community.neo4j.com/u/jalakoo)
#### Post date: [January 6, 2023, 5:12pm UTC](https://community.neo4j.com/t/problem-with-building-neo4j-applications-with-python/58276/3 "2023-01-06T17:12:21Z")

</div>

[@PaulM](https://community.neo4j.com/t5/user/viewprofilepage/user-id/16285) What was your output when you ran: `pip install -r requirements.txt`

---

<div class="post-metadata">

### Author: ![PaulM](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/paulm/32/33063_2.png) [@PaulM](https://community.neo4j.com/u/PaulM)
#### Post date: [January 6, 2023, 8:28pm UTC](https://community.neo4j.com/t/problem-with-building-neo4j-applications-with-python/58276/4 "2023-01-06T20:28:35Z")

</div>

Jalakoo --

Odd. I just tried rerunning it and I got this:

(neoflix) MM226508-PC:app-python-main morawski$ pytest tests/01\_connect\_to\_neo4j\_\_test.py

**=============================================== test session starts ===============================================**

platform darwin -- Python 3.9.4, pytest-7.1.3, pluggy-1.0.0

rootdir: /Users/morawski/Documents/Neo4jPythonClass/app-python-main

**collected 4 items**

tests/01\_connect\_to\_neo4j\_\_test.py .... [100%]

================================================ **4 passed** in 0.17s ================================================

Does this indicate a successful outcome?

Thanks,

Paul

---

<div class="post-metadata">

### Author: ![PaulM](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/paulm/32/33063_2.png) [@PaulM](https://community.neo4j.com/u/PaulM)
#### Post date: [January 9, 2023, 1:54pm UTC](https://community.neo4j.com/t/problem-with-building-neo4j-applications-with-python/58276/5 "2023-01-09T13:54:17Z")

</div>

Jalakoo --

It is clear that I don't understand the role of flask and how to use it. It appears that my problem was trying to run the pytest command from a different shell session on the same machine, rather than the shell where flask was started.

Thanks for your help. Any insights into how to use and control flask would be appreciated.

Paul

---

<div class="post-metadata">

### Author: ![jalakoo](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/jalakoo/32/27445_2.png) [@jalakoo](https://community.neo4j.com/u/jalakoo)
#### Post date: [January 9, 2023, 3:08pm UTC](https://community.neo4j.com/t/problem-with-building-neo4j-applications-with-python/58276/6 "2023-01-09T15:08:58Z")

</div>

Sounds like a perfectly reasonable mistake to make. Thanks for tracking that down!
