sourcegraph / srclib

srclib is a polyglot code analysis library, built for hackability. It consists of language analysis toolchains (currently for Go and Java, with Python, JavaScript, and Ruby in beta) with a common output format, and a CLI tool for running the analysis.
https://srclib.org
Other
939 stars 62 forks source link

Python toolchain installation silently fails #140

Open SlNPacifist opened 9 years ago

SlNPacifist commented 9 years ago

When I try to install python toolchain it just fails giving no info on what happened:

slnpacifist@slnpacifist-TWH:~/atom_workspace/test1$ src toolchain install python
Python (sourcegraph.com/sourcegraph/srclib-python) ============================
Downloading or updating Python toolchain in /home/slnpacifist/.srclib/sourcegraph.com/sourcegraph/srclib-python
Running  [src toolchain get -u sourcegraph.com/sourcegraph/srclib-python]
failed to install/upgrade Python (sourcegraph.com/sourcegraph/srclib-python) toolchain: skipped : 
The following toolchains were not installed:
Python (sourcegraph.com/sourcegraph/srclib-python)
jalanb commented 8 years ago

I am seeing the same problem

Any suggestions as to how one should proceed? What is the real error here, how can I actually install the Python toolchain?

beyang commented 8 years ago

Can you post what OS you're running on, the version of srclib, and any other relevant details about your environment (which version of Python installed, etc.)

Also, can you run with srclib -v toolchain install python and post the output?

jalanb commented 8 years ago

Running on OSX, version 10.11.1 srclib version is 0.0.42 go version is go1.5.1 darwin/amd64 Python version is 2.7.10 pip version is 7.1.2 virtualenv version is 13.1.2 jedi is 0.9.0

$ srclib -v toolchain install python
Python (sourcegraph.com/sourcegraph/srclib-python) ============================
Downloading or updating Python toolchain in /Users/jalanb/.srclib/sourcegraph.com/sourcegraph/srclib-python
Running  [src toolchain get -u sourcegraph.com/sourcegraph/srclib-python]
failed to install/upgrade Python (sourcegraph.com/sourcegraph/srclib-python) toolchain: skipped :
The following toolchains were not installed:
Python (sourcegraph.com/sourcegraph/srclib-python)

$ ls -l /Users/jalanb/.srclib/sourcegraph.com/sourcegraph/srclib-python
total 48
drwxr-xr-x  7 jalanb jalanb  238 Oct 26 23:51 grapher
drwxr-xr-x 10 jalanb jalanb  340 Oct 26 23:51 python
drwxr-xr-x  5 jalanb jalanb  170 Oct 26 23:51 testdata
-rw-r--r--  1 jalanb jalanb 2473 Oct 26 23:51 CONTRIBUTING.md
-rw-r--r--  1 jalanb jalanb 1422 Oct 26 23:51 DCO
-rw-r--r--  1 jalanb jalanb 1218 Oct 26 23:51 Dockerfile
-rw-r--r--  1 jalanb jalanb 1061 Oct 26 23:51 LICENSE
-rw-r--r--  1 jalanb jalanb  747 Oct 26 23:51 Makefile
-rw-r--r--  1 jalanb jalanb  138 Oct 26 23:51 NOTICE
-rw-r--r--  1 jalanb jalanb 3046 Oct 26 23:51 README.md
-rw-r--r--  1 jalanb jalanb  448 Oct 26 23:51 Srclibtoolchain
-rw-r--r--  1 jalanb jalanb 3376 Oct 26 23:51 cli.go
-rwxr-xr-x  1 jalanb jalanb 1556 Oct 26 23:51 install_env.sh
-rw-r--r--  1 jalanb jalanb  187 Oct 26 23:51 requirements.txt
-rw-r--r--  1 jalanb jalanb  557 Oct 26 23:51 setup.py
cduong commented 8 years ago

@beyang I'm trying to get started with srclib and running into the same issue on Ubuntu. The errors are the same for srclib -v toolchain install-std. The output with the verbose flag is the same as without it.

While this is being resolved, are there any manual workarounds to get the toolchains installed?

srclib 0.0.42 go1.5.3 linux/amd64 Python 2.7.7

alexsaveliev commented 8 years ago

Sorry for silly question, but do you have git installed?

srclib toolchain install python invokes git to clone toolchain's source code. Based on the log it sounds like problem happened in the middle of git clone

Please try the following commands as a workaround:

mkdir -p $GOPATH/src/sourcegraph.com/sourcegraph/
cd $GOPATH/src/sourcegraph.com/sourcegraph/
git clone http://sourcegraph.com/sourcegraph/srclib-python.git
cd srclib-python
make install
mkdir -p ~/.srclib/sourcegraph.com/sourcegraph/
ln -s $GOPATH/src/sourcegraph.com/sourcegraph/srclib-python ~/.srclib/sourcegraph.com/sourcegraph/srclib-python

Thanks!