Python virtualenv - Flask + Py2Neo V4 - ImputError


(Ott Lukas 14) #1

I posted a question on Stackoverflow:


Someone has an idea why the py2neo ogm can not be found?

this is what i am trying to do:


This was my starting point:
https://nicolewhite.github.io/neo4j-flask/index.html

Some additional information:

Here I started with the new features in V4:

To clarify it is working fine in developer mode when running in python3 with global pip repository but for deployment i ll want to set everything up in a virtualenvironment.

Thanks for you support!


(Nigel Small) #2

I'm guessing there's a virtualenv discrepancy between where you're running Flask and where you think you're running Flask. Multiple virtualenvs in conjunction with a system Python install can be tricksy to manage, but this will definitely be a local issue on your machine, so there will be a limited amount of help we can give in a general forum.

One of the things you can do to help diagnose what's going on is to drop import sys; print(sys.executable) into your script. This will show you which python is being used to run that script. From there, you can see the packages available to that environment by running path/to/python -m pip freeze from the command line.

Hope this helps.


(Ott Lukas 14) #3

Running in Ubuntu 18.04 VM with System Python 3.6