pythonpipneo4j

python asking me for installed modules


I'm trying to use a python 3 script that requires the "neo4j" module. I already installed the module in python 3, but when try to run the script again, it keeps asking for the module.

When try to run the program that requires neo4j module:

c:\Users\user1\Downloads\PlumHound-master>python3 PlumHound.py -h
Traceback (most recent call last):
  File "PlumHound.py", line 12, in <module>
    import lib.phTasks
  File "c:\Users\user1\Downloads\PlumHound-master\lib\phTasks.py", line 12, in <module>
    from neo4j import GraphDatabase
ModuleNotFoundError: No module named 'neo4j'

When I try to install the module:

c:\Users\user1\Downloads\PlumHound-master>python3 -m pip install neo4j
Requirement already satisfied: neo4j in c:\users\user1\downloads\plumhound-master (4.2.1)
Requirement already satisfied: pytz in c:\users\user1\appdata\local\programs\python\python38-32\lib\site-packages (from neo4j) (2021.1)

Does anyone know or have an idea about why this might be happening, and how I can fix it? PD: The device is offline and i installed the module manually with pip.


Solution

  • If you're on Windows you can try running the following

    python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"
    

    then cd to the output of the last command

    dir
    

    look for the neoj4 package and the corresponding version

    cd neo4j-1.x.x/
    

    and finally run

    python3 setup.py install
    

    If you're a unix based platform try running this.

    $ which python3
    ~/anaconda3/bin/python3
    $ ls
    Anaconda3-2018.12-Linux-x86_64.sh  anaconda3  neo4j-1.7.2  neo4j-1.7.2.tar.gz
    $ cd neo4j-1.7.2/
    $ python3 setup.py install
    

    Also try pip installing neobolt