pypi installation - panuozzo77/StreamingCommunity GitHub Wiki
This guide walks you through installing the StreamingCommunity package using Python's package manager, pip. This is the recommended installation method for Python users as it handles dependency management automatically.
Before installing StreamingCommunity via pip, ensure you have the following prerequisites:
-
Python: Version 3.8 or higher
- Verify with:
python --version
orpython3 --version
- Download Python if needed (make sure to check "Add Python to PATH" during Windows installation)
- Verify with:
-
pip: Python's package installer (usually included with Python)
- Verify with:
pip --version
orpython -m pip --version
- If not installed, follow the pip installation guide
- Verify with:
Using a virtual environment is highly recommended to isolate project dependencies and avoid conflicts with other Python projects.
# Create a virtual environment
python -m venv .venv
# Activate the virtual environment
.venv\Scripts\activate
# Create a virtual environment
python3 -m venv .venv
# Activate the virtual environment
source .venv/bin/activate
Your terminal prompt should change to show the environment name (e.g., (.venv)
), indicating that the virtual environment is active.
Once your virtual environment is activated, install the package from PyPI:
pip install StreamingCommunity
This command downloads and installs the latest version of the StreamingCommunity package and all its dependencies.
Verify that the installation was successful by checking the installed version:
pip show StreamingCommunity
To update to the latest version of StreamingCommunity:
pip install --upgrade StreamingCommunity
After installation, you can run StreamingCommunity by creating a simple Python script:
Create a file named run_streaming.py
with the following content:
from StreamingCommunity.run import main
if __name__ == "__main__":
main()
# Make sure your virtual environment is activated
python run_streaming.py
StreamingCommunity provides several modules that you can use in your own Python scripts:
For downloading HTTP Live Streaming (HLS) content from m3u8 URLs:
from StreamingCommunity.Download import HLS_Downloader
# Initialize with m3u8 URL and optional output path
downloader = HLS_Downloader(
m3u8_url="https://example.com/stream.m3u8",
output_path="/downloads/video.mp4" # Optional
)
# Start the download
downloader.download()
For direct MP4 file downloads:
from StreamingCommunity.Download import MP4_downloader
# Basic usage
downloader = MP4_downloader(
url="https://example.com/video.mp4",
path="/downloads/saved_video.mp4"
)
# Start download
downloader.download()
For downloading content via torrent magnet links:
from StreamingCommunity.Download import TOR_downloader
# Initialize torrent client
client = TOR_downloader()
# Add magnet link
client.add_magnet_link("magnet:?xt=urn:btih:example_hash&dn=example_name", save_path=".")
# Start download
client.start_download()
When you're done working with StreamingCommunity, you can deactivate the virtual environment:
deactivate
This will return your terminal to its normal state.
-
"Command not found" error when running pip
- Ensure Python is correctly installed and added to your PATH
- Try using
python -m pip
instead of justpip
-
Permission errors during installation
- On Linux/macOS, you might need to use
sudo pip install StreamingCommunity
- Alternatively, use the
--user
flag:pip install --user StreamingCommunity
- On Linux/macOS, you might need to use
-
Dependency conflicts
- Always use a virtual environment to avoid conflicts
- If conflicts occur, try
pip install --upgrade --force-reinstall StreamingCommunity
If you encounter issues not covered here:
- Check the Common Issues section
- Visit the GitHub Issues page
- Join the Discord community for support
- Configure your settings
- Learn about command line arguments
- Try your first global search