Pycharm remote Debugging under Windows Pyspark

Source: Internet
Author: User
Tags pyspark

Reference http://www.mamicode.com/info-detail-1523356.html
1. Remote execution: Vi/etc/profile
Add a line:
Pythonpath= $SPARK _home/python/: $SPARK _home/python/lib/py4j-0.9-src.zip
or pythonpath= $SPARK _home/python/: $SPARK _home/python/lib/py4j-0.8.2.1-src.zip
2. Install Pip and py4j
Download pip-9.0.1.tar.gz and py4j-0.10.4.tar.gz
Unzip pip-9.0.1.tar.gz and PY4J-0.10.4.TAR.GZ,CD to extract directory execution: sudo python setup.py install
3. Local Pycharm settings
File > Settings > Project interpreter:
Tools > Dployment > Configuration:
4. Add in the running code:
Import OS
Import Sys
os.environ[' spark_home '] = "/opt/cloudera/parcels/cdh-5.9.1-1.cdh5.9.1.p0.4/lib/spark"
Sys.path.append ("/opt/cloudera/parcels/cdh-5.9.1-1.cdh5.9.1.p0.4/lib/spark/python")

Pycharm remote Debugging under Windows Pyspark

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.