Code Monkey home page Code Monkey logo

Comments (19)

suspiciousCloud avatar suspiciousCloud commented on August 22, 2024 1

I fixed pygraphviz’s graphviz dependency issue by specifying installation options in requirements.txt. Let me know if anyone runs into related bugs.

from sherlock.

suspiciousCloud avatar suspiciousCloud commented on August 22, 2024 1

Hey everyone, here's the link to our Slack group.
https://join.slack.com/t/bakerstconsulting/shared_invite/enQtMzM3MzU4NjQyMDIxLWIyZTNjZDBmNmQ0ZTM3ODEwZGU0NTIwMWU5MWMyYjAzMTRiYjcyMTkxY2RkMjJiZDM1Y2NjMDlmMGIyNzIxNzQ

from sherlock.

inp2 avatar inp2 commented on August 22, 2024

Just added people to the issue who want to solve it

from sherlock.

 avatar commented on August 22, 2024

Looks like the current requirements.txt file has a bunch of stuff that my virtualenv doesn't have. I don't know whether that's due to differences between my machine and Benjamin's. Here is my requirements.txt created by running pip freeze > usipeusrequirements.txt.

backports.functools-lru-cache==1.5
cycler==0.10.0
decorator==4.2.1
kiwisolver==1.0.1
matplotlib==2.2.0
networkx==2.1
numpy==1.14.1
pandas==0.22.0
Pillow==5.0.0
pkg-resources==0.0.0
pydot==1.2.4
pygraphviz==1.3.1
pyparsing==2.2.0
python-dateutil==2.6.1
pytz==2018.3
reportlab==3.4.0
scikit-learn==0.19.1
scipy==1.0.0
seaborn==0.8.1
six==1.11.0
sklearn==0.0
subprocess32==3.2.7

This may solve the issue where ccsm version 0.9.12.2 can't be installed by pip. I ran a search for ccsm on the pypi website and it's not listed as a package.

from sherlock.

BenjaminPollak avatar BenjaminPollak commented on August 22, 2024

Doing some digging and realizing that the script being python 2 is creating some REALLY nasty issues with the virtual environment, looking for fixes...

For some insight into the issue, here's a link.

from sherlock.

BenjaminPollak avatar BenjaminPollak commented on August 22, 2024

New requirementst.txt pushed, pull it and let me know if it works. 2 packages are slightly upgraded and one is missing compared to what you posted above.

Okay, so here's what I found:

make a virtualenv with with the following command:
virtualenv --python=/usr/bin/python2.7 venv

install dependencies with:
pip2 install -r requirements.txt

Sherlock seems to be buggy, but works (except for part 3, but that was broken before anyway).

EDIT: Sherlock is NOT buggy, clarified in issue 2.

from sherlock.

BenjaminPollak avatar BenjaminPollak commented on August 22, 2024

The requirements.txt was updated to include flask, please let me know if it's functional.

from sherlock.

inp2 avatar inp2 commented on August 22, 2024

Running the latest requirements file I receive this error:

Collecting subprocess32=.3.2.7 (from -r requirements.txt (line26))
Using cached subprocess32.3.2.7.tar.gz
Complete output from command python setup.py egg_info:
This backport is for Python 2.x only.

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-_8y3ufrr/subprocess32/

from sherlock.

BenjaminPollak avatar BenjaminPollak commented on August 22, 2024

The new requirements.txt works on my end.

EDIT: It is NOT working on my end, I believe this is because scikitlearn uses scipy as a dependency but requirements.txt files are organized alphabetically. I'll poke around.

from sherlock.

BenjaminPollak avatar BenjaminPollak commented on August 22, 2024

@inp2 is what you were describing an error or warning? Are you sure you're using pip2 specifically?

from sherlock.

BenjaminPollak avatar BenjaminPollak commented on August 22, 2024

@suspiciousCloud the update you made to requirements.txt breaks dependency installation on my machine. Could you specify the issue you're having with the requirements.txt in commit 16075e1?

from sherlock.

suspiciousCloud avatar suspiciousCloud commented on August 22, 2024

pygraphviz requires graphviz which my Ubuntu VM didn’t have so i received this error:
Running setup.py install for pygraphviz ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-build-Rueu87/pygraphviz/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-ZzPFrj-record/install-record.txt --single-version-externally-managed --compile --user --prefix=:
running install
Trying pkg-config
Failed to find pkg-config
Trying dotneato-config
Failed to find dotneato-config
Failed to find dotneato-config
library_dirs=None
include_dirs=None
error: Error locating graphviz.
----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-build-Rueu87/pygraphviz/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-ZzPFrj-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-Rueu87/pygraphviz/

So i implemented the fix described here which cleared up the issue:
https://www.lesinskis.com/tag/python.html

from sherlock.

BenjaminPollak avatar BenjaminPollak commented on August 22, 2024

Could you try running

sudo apt-get install graphviz libgraphviz-dev pkg-config; pip2 install -r requirement.txt

in a new vm and see if sherlock will run?

from sherlock.

inp2 avatar inp2 commented on August 22, 2024

It works for me now

from sherlock.

BenjaminPollak avatar BenjaminPollak commented on August 22, 2024

Okay, so I think I got it.

Do the following:

  1. Install and update ubuntu, along with git, pip, and virtualenv.
  2. install graphviz with sudo apt-get install graphviz libgraphviz-dev pkg-config
  3. Clone sherlock.
  4. Go to the server directory and type pip install -r requirements.txt --no-cache-dir

EDIT: Having issues. I also need to apt install python-tk, but now I'm having issues with pygraphviz.

EDIT 2: Ok, I think I solved it. You have to install the dependencies and then specify some options. So you have to install pygraphviz independently using pip install --install-option="--incude-path=/usr/include/graphviz" --install-option="--library-path=/usr/lib/graphviz" pygraphviz

EDIT 3: Also need to sudo apt install python-tk
I'll look into getting this into the requirements file, after a quick triple check that this works.

from sherlock.

BenjaminPollak avatar BenjaminPollak commented on August 22, 2024

Mkay, here are cohesive instructions to get sherlock running

  1. Install and update an ubuntu 17 vm
  2. Install and update ubuntu, along with git, pip, and virtualenv.
  3. Run sudo apt-get install graphviz libgraphviz-dev pkg-config python-tk python-dev
  4. Go to the server directory.
  5. Create a virtual environment using virtualenv --python=/usr/bin/python2.7 venv. Activate the environment.
  6. Run pip install --install-option="--incude-path=/usr/include/graphviz" --install-option="--library-path=/usr/lib/graphviz" pygraphviz.
  7. Run pip install -r requirements.txt --no-cache-dir

from sherlock.

 avatar commented on August 22, 2024

I was testing out these installation instructions using a fresh Ubuntu 17.10 VM and I got it to work without steps 5 and 6 but I did need to run sudo apt-get install python-dev for step 7, because it was complaining about a missing Python.h header file.

from sherlock.

BenjaminPollak avatar BenjaminPollak commented on August 22, 2024

@usipeus thanks for the feedback! Steps 5 and 6 are taken as a python coding best practice. I'll explain more in person today.

from sherlock.

BenjaminPollak avatar BenjaminPollak commented on August 22, 2024

Quick update: use pip install pygraphviz --install-option="--include-path=/usr/include/graphviz" --install-option="--library-path=/usr/lib/graphviz/" to install pygraphviz.

from sherlock.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.