3D Geodata Academy

3D Python Environment Setup: 7-Steps Guide for Beginners

Published on July 3, 2024 • 5 min read

Python

This guide helps you get started with Python for 3D Data Science. It covers the essential steps in setting up your environment, including the resources you’ll need and the workflow to follow. By the end of this guide, you’ll have a working environment set up and be ready to delve into 3D data science with Python. The first result is a synthetic point cloud shape generator.

1. The 3D Python Setup

This guide assumes you are a beginner with little to no experience with Python. The goal is to get you up and running with a Python environment specifically designed for working with 3D data.

2. Related Resources for 3D Python 🍇

3. The 3D Python Environment Workflow 🗺️

The following steps will guide you through setting up your 3D Python Environment for 3D data science:

The 3D Python Environment Setup by Florent Poux
  1. Environment Setup with Miniconda: Download and install Miniconda following the instructions on the Anaconda website.
  2. Package Manager and Using Pip: Use pip, the recommended package manager for Python environments, to install the necessary libraries.
  3. Installing Libraries: Install essential libraries like NumPy, SciPy, scikit-learn, Matplotlib, and Open3D using pip.
  4. Installing an IDE: Install an IDE (Integrated Development Environment) like Spyder to write and execute Python code.
  5. Exploring the IDE: Familiarize yourself with the functionalities of the Spyder IDE.
  6. Structuring Your Code for First Applications: Organize your code using folders for code, data, and results.
  7. Your First Script: Create a Python script to generate a random point cloud and visualize it in 3D using Open3D.

After following this simple 7-step workflow, you will be able to generate simple 3D Shapes as point clouds, such as cubes, spheres, and planes.

3D Shape Generated as Point Clouds with Python by Florent Poux

The Code for these can be found on my Github Page (link in section 2). Below is a snippet:

import numpy as np
import open3d as o3d

def generate_random_point_cloud(num_points=5000, num_shapes=1):
    # Initialize an empty list to store all points
    points = []
    
    # Generate multiple shapes
    for * in range(num*shapes):
        # Randomly choose a shape type
        shape_type = np.random.choice(['sphere', 'cube', 'plane'])
        # Calculate number of points for this shape
        shape_points = num_points // num_shapes
        
        if shape_type == 'sphere':
            # Generate points on a sphere
            radius = np.random.uniform(0.5, 1.0)
            theta = np.random.uniform(0, 2*np.pi, shape_points)
            phi = np.random.uniform(0, np.pi, shape_points)
            x = radius * np.sin(phi) * np.cos(theta)
            y = radius * np.sin(phi) * np.sin(theta)
            z = radius * np.cos(phi)
        elif shape_type == 'cube':
            # Generate points in a cube
            x = np.random.uniform(-1, 1, shape_points)
            y = np.random.uniform(-1, 1, shape_points)
            z = np.random.uniform(-1, 1, shape_points)
        else:  # plane
            # Generate points on a plane (z=0)
            x = np.random.uniform(-1, 1, shape_points)
            y = np.random.uniform(-1, 1, shape_points)
            z = np.zeros(shape_points)
        
        # Generate a random center for the shape
        shape_center = np.random.uniform(-5, 5, 3)
        # Add the shape's points to the main list, offsetting by the shape's center
        points.extend(np.column_stack((x, y, z)) + shape_center)
    
    # Convert the list of points to a numpy array and return
    return np.array(points)

#%% Random Experiments
# Generate random point cloud with 10000 points and 8 shapes
point_cloud = generate_random_point_cloud(10000, 8)

# Create Open3D point cloud object
pcd = o3d.geometry.PointCloud()
pcd.points = o3d.utility.Vector3dVector(point_cloud)

# Visualize the point cloud
o3d.visualization.draw_geometries([pcd])

4. The Next 3D Python Steps 🦶

This guide provides a solid foundation for working with 3D Data Science in Python. Once you have a working environment, you can explore further tutorials and experiment with more complex 3D data manipulation and analysis tasks. The provided resources will serve as valuable references as you continue your journey in 3D Data Science with Python.

My 3D Recommendation 🍉

This 3D Python Environment Setup is your first step towards massive automation. If you want to continue to explore what is feasible with Python, I recommend checking out other tutorials or jumping onto the Weekly Newsletter, which is accompanied by a free Email Course that shares the main solutions to 3D Python Development and more.


Other 3D Tutorials

If you want to get a tad more toward application-first or depth-first approaches, I curated several learning tracks and courses on this website to help you along your journey. Feel free to follow the ones that best suit your needs, and do not hesitate to reach out directly to me if you have any questions or if I can advise you on your current challenges!

Open-Access Knowledge

3D Online Courses

3D Learning Tracks

  • 3D Segmentator OS: 3D Python Operating System to Create Low-Dependency 3D Segmentation Apps
  • 3D Collector’s Pack: Complete Course Track from 3D Data Acquisition to Automated System Creation

Ready to start?

2,800+ engineers started exactly here. Free. No credit card. No tricks.

Get Instant access

✓ Used by teams at Meta, Airbus, CNRS

Architect Spatial Intelligence.

The Brain-to-Deploy methodology. From first principles to production-grade 3D AI.

The Foundation
€1 997 €7 249
Founding Price Lifetime Access

Master the core 3D AI stack. For innovators building a strategic edge in spatial intelligence.

What you get

  • The spine of the program. Six Acts, and each one ends in a working system you build, from raw scan to deliverable: a desktop 3D app, a one-click reconstruction engine, a human-in-the-loop labeller, an end-to-end 3D classifier, a spatial AI agent and a Scan-to-BIM digital twin engine.

  • For each of the six systems, a student version you complete and a complete reference solution to check against. Code templates, datasets and handouts sit in your dashboard, so you never start from a blank page.

  • Every standalone specialty course: Gaussian splatting, PointNet, change detection, feature extraction and more, plus 3D Forge: Build Camp. The four Operating Systems come with Professional.

  • Two editions of my 3D AI software, both with source code. Learning is the guided workspace that runs your missions. The Build Camp edition of Science ships with 3D Forge: Build Camp. Use them in your paid client work, under the Neurones 3D Source Licence. Professional upgrades you to the Full edition.

  • The full eBook, plus everything around the episodes: guides, build notes for every build, a handout per lesson, real datasets and an interactive experience page per episode.

  • Open channels plus Foundation channels, to share work and get feedback. Once your builds are done, I stamp your certificate myself.

Secure Foundation Access

Lifetime access · 14-day money-back guarantee

Best Value
Professional
€2 997 €13 997
Founding Price Lifetime Production Access

Scale from prototype to industrial-grade deployment. For founders architecting proprietary spatial systems.

What you get

  • Everything in Foundation
  • The full application with app, SDK and source code: AI model training, semantic labelling, a local agent, video to 3D, Gaussian splats, floor plans and Scan-to-BIM. It covers the Build Camp edition. Updates for 12 months, renewable.

  • Reconstructor OS, Segmentor OS, Deep Learning OS and Spatial OS: four complete production stacks I use with consulting clients. Content updates for life of access; new modules for 12 months, then through the optional yearly renewal. Each track valued at €1,497.

  • One ready-to-run app per Act build: 3D Processing Software, One-Click Reconstruction Engine, HITL Labelling System, End-to-End 3D Classifier, Agentic Spatial Web App and Digital Twin Geometric Engine. Plus the AI Agent Toolkit: a structured map of your courses, code, datasets and handouts for your own AI assistant, with instructions and guardrails. Very powerful, use it with caution.

  • A monthly briefing on what moved in 3D AI, plus a curated board of 3D AI roles and tenders.

Accelerate to Professional

Lifetime access · 14-day money-back guarantee

Architect
€12 997
Cohort full. Applications open for the next intake.

Elite 1-on-1 advisory. I personally review your architecture and deliver custom Brain-to-Deploy blueprints.

What you get

  • Everything in Professional
  • A kickoff session to map your system, plus recurring strategy calls where I pressure-test your architecture and roadmap.

  • A direct line to me for architecture reviews and technical unblocks. Guaranteed response within 48h on business days.

  • Not built for you, but with you. I code alongside you to architect and ship a custom 3D AI solution for your specific use case.

  • Portfolio & Project Endorsement
Apply by email

By application · 14-day money-back guarantee

Reach out or book a call
to keep learning

Reach out for tailored support, or book a call to have more information about new courses.

Scroll to Top