njherrmann / pair-guides

A tool to find valid dual-gRNA guide pairs for CRISPR/Cas9 gene blocks
0 stars 0 forks source link

Setup script failed #3

Open elmonster1 opened 7 years ago

elmonster1 commented 7 years ago

Tried running setup.sh script with Python 2.7.10, but failed. Got the following error:

1 error generated. Compile failed: command 'gcc' failed with exit status 1 /tmp/easy_install-RmEUyD/lxml-3.7.3/temp/xmlXPathInitT_AXpw.c:2:1: warning:       type specifier missing, defaults to 'int' [-Wimplicit-int] main (int argc, char **argv) { ^ 1 warning generated. error: Setup script exited with error: command 'gcc' failed with exit status 1 Building master script.

njherrmann commented 7 years ago

This is an issue with the python development environment on your machine. 'gcc' is the compiler that is called by the installer when configuring the three python modules needed for the script to run. If you can see a file titled "pair-guides" in the project directory, then the rest of the setup script probably succeeded.

As for troubleshooting this problem, you need to figure out which of the three modules (if any) you're missing. The modules are named "requests", "bs4", and "lxml". Follow these instructions:

  1. Run python from the command line (in any directory, just execute the command "python"). This opens an interactive python environment.
  2. Try importing the requests module with the command "import requests"
  3. Repeat for the "bs4" and "lxml" modules. Take note of which ones work and which fail. A successful import will yield no feedback while a failed import should pop up with a traceback ending with an "ImportError"

For each of the modules that failed, you can try to install them manually. I think this is the step that failed in the setup script. From the command line, the manual install should be a "sudo" command (to run as administrator) followed by "easy_install ". If you get the same issue as above, you need to track down your version of gcc. You can see if there is even a version installed by running the command "which gcc". This should print the default gcc bin location (/usr/bin/gcc). Otherwise you may have to install Xcode again (if it's installed at all). Xcode is Apple's IDE that generates these compiler binaries.

njherrmann commented 7 years ago

What operating system are you using?

elmonster1 commented 7 years ago

My operating system is OS Capitain. I don't have the python.h file in the expected directory and the latest Xcode. This is a lot for the user to have to troubleshoot. Is it possible to package all these into the setup and account for different operating systems (or at least specify the OS requirement)?

njherrmann commented 7 years ago

These problems are specific to the developer environment on your OS. The script itself has some OS detection to determine how to install the python modules, but the other machines I tested didn't give me this issue.

These problems will go away once I build a GUI for the script and freeze the code into an app--the proper python dependencies will be packaged up in in the app directory.

njherrmann commented 7 years ago

An update: I'm working on building a basic user interface that will allow me to distribute the tool as an app. I hope to have something working by the end of next week.