mistercrunch commented on a change in pull request #7386: Updating contributing/install docs URL: https://github.com/apache/incubator-superset/pull/7386#discussion_r279587888
########## File path: CONTRIBUTING.md ########## @@ -293,20 +293,58 @@ python setup.py build_sphinx ### Flask server -Make sure your machine meets the [OS dependencies](https://superset.incubator.apache.org/installation.html#os-dependencies) before following these steps. +#### OS Dependencies + +Make sure your machine meets the [OS dependencies](https://superset.incubator.apache.org/installation.html#os-dependencies) before following these steps. + +In addition you will need to install the mysql client to get mysql_config, which is required by mysqlclient in requirements-dev.txt. + +For Debian/Ubuntu: + +```bash +sudo apt-get install -y libmysqlclient-dev +``` + +For OS X via brew: + +```bash +brew install mysql-client +echo 'export PATH="/usr/local/opt/mysql-client/bin:$PATH"' >> ~/.bash_profile +source ~/.bash_profile +``` + +Developers should use a virtualenv. Anaconda Python users should make sure that conda installs the virtualenv package, otherwise conda packages won't play well with packages installed by pip. In addition, Anaconda Python installs its own version of certifi that must be removed minus dependencies for requirements.txt's certifi to install. + +```bash +# Conda modified virtualenv on conda-forge to work with pip +conda install --force-reinstall -y virtualenv + +# Remove certifi that came with the conda env, install of requirements.txt will restore +conda remove certifi --force +``` + +For other Python's: + +``` +# Otherwise pip is fine +pip install virtualenv +``` + +Then proceed with: ```bash # Create a virtual environemnt and activate it (recommended) -virtualenv -p python3 venv # setup a python3.6 virtualenv +virtualenv -p python3 venv # setup a python3.6 virtualenv (use a precise path to Python for Anaconda) source venv/bin/activate # Install external dependencies pip install -r requirements.txt pip install -r requirements-dev.txt + # Install Superset in editable (development) mode pip install -e . -# Create an admin user +# Create an admin user in the app sqlite DB at ~/.superset/superset.db Review comment: I'd say `# Create an admin user in your metadata database`, `sqlite DB at ~/.superset/superset.db` is the default value for that, but people may be using postgres or mysql locally (I do) ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
