Last modified: Jun 14, 2026
Install Socketify.py in Python
Socketify.py is a powerful Python library for building high-performance web applications. It is built on top of uvicorn and asyncio, offering fast HTTP and WebSocket support. In this guide, you will learn how to install Socketify.py correctly on your system.
Prerequisites Before Installation
Before installing Socketify.py, ensure you have Python 3.8 or newer. Check your Python version with this command:
python --versionIf Python is not installed, download it from the official website. Also, ensure pip is available. Verify pip with:
pip --versionInstall Socketify.py with pip
The simplest way to install Socketify.py is using pip. Open your terminal or command prompt and run:
pip install socketifyThis command downloads the latest stable version from PyPI. If you are on Linux or macOS, you might need to use pip3:
pip3 install socketifyAfter installation, verify it worked by importing the library in Python:
import socketify
print("Socketify.py installed successfully!")Expected output:
Socketify.py installed successfully!Install in a Virtual Environment
Using a virtual environment is a best practice. It isolates your project dependencies. Create and activate a virtual environment:
python -m venv myenv
source myenv/bin/activate # On macOS/Linux
myenv\Scripts\activate # On WindowsNow install Socketify.py inside the environment:
pip install socketifyThis keeps your global Python clean and avoids conflicts with other projects.
Install Specific Version
Sometimes you need a specific version for compatibility. Use pip install socketify==version. For example, to install version 0.3.0:
pip install socketify==0.3.0Check available versions with:
pip index versions socketifyInstall from Source (GitHub)
If you want the latest development version, install directly from the GitHub repository. First, clone the repo:
git clone https://github.com/cirospaciari/socketify.py.git
cd socketify.pyThen install it in development mode:
pip install -e .This allows you to test unreleased features.
Troubleshooting Common Errors
Error: pip: command not found
This means pip is not installed. Install it with:
python -m ensurepip --upgradeError: No module named 'socketify'
Even after installation, this error appears if you are in the wrong environment. Ensure your virtual environment is activated. Also, check if you installed it globally but are using a different Python interpreter.
Permission Denied on Linux/macOS
If you get permission errors, use --user flag:
pip install --user socketifyOr run with sudo (not recommended for security):
sudo pip install socketifyBuild Errors on Windows
Socketify.py requires a C++ compiler on Windows. Install Microsoft C++ Build Tools from the official site. Alternatively, use a precompiled wheel by upgrading pip:
pip install --upgrade pip wheel
pip install socketifyTest Your Installation
Create a simple example to confirm everything works. Write a basic server in a file app.py:
import socketify
app = socketify.App()
@app.get("/")
def home(req, res):
res.send("Hello, Socketify!")
app.listen(3000, lambda: print("Server running on http://localhost:3000"))
app.run()Run the server:
python app.pyOpen your browser at http://localhost:3000. You should see "Hello, Socketify!". If you see this, the installation is successful.
Uninstall Socketify.py
If you need to remove it, use pip:
pip uninstall socketifyConfirm the removal when prompted.
Conclusion
Installing Socketify.py is straightforward with pip. Always use a virtual environment to avoid dependency issues. If you encounter errors, check your Python version, compiler tools, or try installing from source. Now you are ready to build fast web apps with Socketify.py. For more advanced usage, explore the official documentation and start coding.