You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+63-2Lines changed: 63 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -142,12 +142,73 @@ This will create two files in the `dist/` directory:
142
142
143
143
### 4. Publish to PyPI
144
144
145
-
Install twine if you haven't already:
145
+
**Option A: Install in current environment**
146
+
147
+
Note that the latest twine and readme-renderer require `docutils>=0.21.2`, which conflicts with Sphinx's requirement for `docutils<0.21`. First, upgrade pip and setuptools, then install compatible versions:
148
+
149
+
```bash
150
+
pip install --upgrade pip setuptools wheel
151
+
pip install --upgrade importlib_metadata
152
+
pip install 'twine<5.0''readme-renderer<44.0'
153
+
```
154
+
155
+
**Option B: Use a separate environment (recommended)**
156
+
157
+
This avoids all dependency conflicts.
158
+
159
+
For conda users:
160
+
161
+
```bash
162
+
conda create -n publish_env python=3.10
163
+
conda activate publish_env
164
+
pip install --upgrade pip setuptools wheel
165
+
pip install build twine
166
+
```
167
+
168
+
For venv users:
146
169
147
170
```bash
148
-
pip install twine
171
+
python -m venv publish_env
172
+
source publish_env/bin/activate # On Windows: publish_env\Scripts\activate
173
+
pip install --upgrade pip setuptools wheel
174
+
pip install build twine
149
175
```
150
176
177
+
**Authentication Setup**
178
+
179
+
Before publishing, you need to set up authentication:
0 commit comments