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: CHANGELOG.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,12 +9,12 @@ Release date: UNRELEASED
9
9
* The `layout` command now properly handles the `tight` special case by fitting the page size around the existing geometries, accommodating for a margin if provided (#556)
10
10
* Added new units (`yd`, `mi`, and `km`) (#541)
11
11
* Added `inch` unit as a synonym to `in`, useful for expressions (in which `in` is a reserved keyword) (#541)
12
-
* Migrated to PySide6 (from PySide2), which simplifies installation on Apple silicon Macs (#552, #559)
12
+
* Migrated to PySide6 (from PySide2), which simplifies installation on Apple silicon Macs (#552, #559, #567)
13
13
14
14
### Bug fixes
15
15
16
16
* Fixed a viewer issue where page width/height of 0 would lead to errors and a blank display (#555)
17
-
* Fixed a viewer issue where fitting the document bounds would be lost when bounds change (*vsketch* only) (#564)
17
+
* Fixed a viewer issue where fitting the view to the document would not adjust when page size changes (*vsketch* only) (#564)
Copy file name to clipboardExpand all lines: README.md
+3-4Lines changed: 3 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -194,14 +194,13 @@ TL;DR:
194
194
```bash
195
195
pipx install "vpype[all]"
196
196
```
197
-
- Installing on M1 Mac requires special care — check the [installation instruction](https://vpype.readthedocs.io/en/latest/install.html#installing-using-pipx-apple-silicon-m1).
198
-
- A Windows installer is available [here](https://github.com/abey79/vpype/releases) (plug-ins cannot be installed
199
-
when using this installation method).
197
+
- A Windows installer is available [here](https://github.com/abey79/vpype/releases), but plug-ins cannot be installed
198
+
when using this method).
200
199
- A CLI-only version of *vpype* can be installed using the following command:
201
200
```bash
202
201
pipx install vpype
203
202
```
204
-
This version does not include the [`show`](https://vpype.readthedocs.io/en/latest/reference.html#show) command but does not require some of the dependencies which are more difficult or impossible to install on some platforms (such as matplotlib, PySide2, and ModernGL).
203
+
This version does not include the [`show`](https://vpype.readthedocs.io/en/latest/reference.html#show) command but does not require some of the dependencies which are more difficult or impossible to install on some platforms (such as matplotlib, PySide6, and ModernGL).
Copy file name to clipboardExpand all lines: docs/contributing.rst
+11-10Lines changed: 11 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ Contributions are most welcome and there are many ways you can help regardless
11
11
12
12
* First and foremost, do provide feedback on what you do with *vpype* and how you do it, either on the `DrawingBots Discord server`_ or by filling an `issue`_. This knowledge is critically important to improve *vpype*.
13
13
* Write an `issue`_ for any problem or friction point you encounter during the installation or use of *vpype* or for any feature you feel is missing.
14
-
* Make the present documentation better by fixing typos and improve the quality of the text (English is *not* the main author's native language).
14
+
* Make the present documentation better by fixing typos and improve the quality of the text (English is *not* the main author's native language). `This issue <https://github.com/abey79/vpype/issues/400>`__ maintains a list of possible improvements.
15
15
* Write cookbook recipes for new workflows.
16
16
* Improving the test coverage and contributing to CI/CD aspects is welcome — and a good way to become familiar with the code.
17
17
* Improve existing features or contribute entirely new ones with a `pull request`_. If you plan on creating new commands, consider making a :ref:`plugin <plugins>` first — it will be easy to integrate it into *vpype*'s codebase later on if it makes sense.
@@ -40,33 +40,34 @@ Development environment
40
40
<https://python-poetry.org/docs/#installation>`_ is required to prepare the development environment. It can be
41
41
installed either using an install script, or using pipx. Run this command to use the install script::
@@ -9,152 +9,70 @@ This page explain how to install *vpype* for end-users. If you intend to develop
9
9
10
10
.. note::
11
11
12
-
The recommended Python version is 3.10.2 or later (except for macOS/M1 computer, for which Python 3.9 is recommended). *vpype* is also compatible with Python 3.8 and 3.9.
12
+
The recommended Python version is 3.10.2 or later. *vpype* is also compatible with Python 3.8 and 3.9.
13
13
14
-
..
15
-
Overview
16
-
========
14
+
.. warning::
17
15
18
-
This table provides an overview of the available methods to install *vpype*. The recommended method is using `pipx`_.
`pip`_ (virtual environment), ✅, ✅, ✅, a virtual environment must be manually created *and* activated
28
-
installer, 🚫, ✅, 🚫, does not support plug-ins
29
-
`MacPorts`_, ✅️, 🚫, 🚫, ⚠️ plug-ins must be installed globally (not recommended)
30
-
31
-
Installing Python and a Python-based package can be overwhelming for new users. The following glossary shortly defines a few of the key terms and notions.
32
-
33
-
Python interpreter
34
-
Any Python-based package needs a Python interpreter to be executed. A major version of the Python interpreter is released every year. The current one is the Python 3.10 series. In general, using the latest version is recommended but using an older version is sometime necessary. For example, *vpype* requires Python 3.9 to run on macOS/M1 computers.
35
-
36
-
`pip`_
37
-
`pip`_ is the fundamental tool to download and install publicly-available packages like *vpype*. These package are stored in the `Python Package Archive <PyPI>`_ where they can be found by pip. pip automatically download and install all the dependencies required by the package.
38
-
39
-
Global installation
40
-
By default, pip installs packages globally, next to the Python interpreter. Such package become available to all users and software on the computer. Although doing so may sound reasonable, it is in general strongly discouraged because of the very likely risk of conflicts when different packages relies on different version of the same dependencies.
41
-
42
-
`Virtual Environments <venv>`_
43
-
To avoid the conflict issue, packages and their dependencies, a `virtual environments <venv>`_ may be created. They behave like isolated, self-contained directory which contains both the Python interpreter, the desired package, and its dependencies. Multiple virtual environments can be used for different tasks, avoiding all risks of conflicts. When using `pip`_, packages will be installed in a given virtual environment *if (and only if)* said virtual environment was previously activated (activating a virtual environment makes its content available to the current terminal session). Managing and using virtual environments can either be done manually (using the `venv`_ standard Python package), or can be done automatically using some high-level tool.
44
-
45
-
`pipx`_
46
-
`pipx`_ is such a high-level tool and is made to install Python-based CLI software such as *vpype*. Specifically, it automates two important tasks: (1) it automatically creates and manages a virtual environment for every software installed with it and (2) it ensures that the installed software is in the path and thus available in terminal windows.
47
-
48
-
`MacPorts`_
49
-
`MacPorts`_ is a package manager dedicated to the installation of various open-source software and libraries on the Mac platform. It is similar to the packages manager typically found in Linux distributions.
16
+
*vpype* is not yet compatible with Python 3.11.
50
17
51
18
52
19
macOS
53
20
=====
54
21
55
-
.. caution::
56
-
57
-
**macOS/M1 note**: Due to the restricted availability of an ARM-compatible PySide2 library, installing *vpype* on a macOS/M1 computers requires the specific steps described bellow. Using alternative ways to install Python and *vpype* may work, but typically don't and are thus discouraged.
58
-
59
22
.. highlight:: bash
60
23
61
-
`MacPorts`_ is the recommended way to install the Python interpreter on macOS.
62
-
63
-
Following the `installation instructions <https://www.macports.org/install.php>`__ to install MacPorts. Then, make sure its port database is up-to-date::
64
-
65
-
$ sudo port selfupdate
66
-
$ sudo port upgrade outdated
67
-
68
-
69
-
Installing using the MacPorts port
70
-
----------------------------------
71
-
72
-
.. note::
73
-
74
-
Although this is the easiest way to install *vpype*, it is discouraged when using :ref:`plug-ins <plugins>` because they would have to be globally installed.
75
-
76
-
Installing *vpype* using the port can be done with the following command::
77
-
78
-
$ sudo port install vpype
79
-
80
-
This installation method works for both Intel- and M1-based Macs.
81
24
25
+
Installing Python
26
+
-----------------
82
27
83
-
Installing using pipx (Apple silicon/M1)
84
-
----------------------------------------
28
+
The official installer is the recommended way to install Python on your computer. It can be downloaded `here <https://www.python.org/downloads/>`__.
85
29
86
-
Installing *vpype* on Macs with Apple Silicon requires specific steps because some its dependencies are not yet fully supported on this architecture. Using `pipx`_ is the recommended method when using plug-ins.
87
-
88
-
First, install the required ports using MacPorts::
89
-
90
-
$ sudo port install python39 py39-shapely py39-scipy py39-numpy py39-pyside2
91
-
92
-
Then, install pipx::
93
-
94
-
$ sudo port install pipx +python39
95
-
$ pipx ensurepath
96
-
97
-
The second command above ensures that both pipx and the software it will install are available the terminal. You may need to close and re-open the terminal window for this to take effect.
30
+
.. caution::
98
31
99
-
Finally, install *vpype*::
32
+
When install Python, make sure to select version that is compatible with *vpype*. See the :doc:`top of this page <install>` for more information.
Note the use of the ``--system-site-packages`` option. This is important because because *vpype* relies the version of PySide2 that was installed earlier with MacPort.
35
+
You can ensure that the installed Python interpreter is properly installed by running this command::
104
36
105
-
*vpype* should now be installed and ready to use. You may check that it is fully functional by checking its version and displaying some random lines::
37
+
python3 --version
106
38
107
-
$ vpype --version
108
-
vpype 1.9.0
109
-
$ vpype random show
39
+
It should produce an output similar to::
110
40
41
+
Python 3.10.8
111
42
112
-
Installing using pipx (Intel)
113
-
-----------------------------
43
+
The version number should match the installer you used.
114
44
115
-
.. note::
45
+
Note that installing Python from `Homebrew <https://brew.sh>`__ or `MacPorts`_ is possible as well.
116
46
117
-
The instructions for Apple silicon/M1 Macs also apply, but since dependencies have better support for Intel-based Macs, some steps may be simplified.
118
47
119
-
First, install pipx::
48
+
Installing pipx
49
+
---------------
120
50
121
-
$ sudo port install pipx
122
-
$ pipx ensurepath
123
-
124
-
The second command above ensures that both pipx and the software it will install are available the terminal. You may need to close and re-open the terminal window for this to take effect.
51
+
`pipx`_ is a tool that allows you to install Python applications in isolated environments. It is the recommended way to install *vpype* on macOS. It can be installed with the following commands::
125
52
126
-
Then, install *vpype*::
53
+
python3 -m pip install pipx
54
+
python3 -m pipx ensurepath
127
55
128
-
$ pipx install "vpype[all]"
56
+
After this, restart your terminal and ensure that pipx is properly installed by running this command::
129
57
130
-
*vpype* should now be installed and ready to use. You may check that it is fully functional by checking its version and displaying some random lines::
58
+
pipx --version
131
59
132
-
$ vpype --version
133
-
vpype 1.9.0
134
-
$ vpype random show
60
+
It should print out the current version of pipx without error::
135
61
62
+
1.1.0
136
63
137
-
Installing using pipx and the official Python distribution
For Intel-based Macs, the official Python distribution may be used as an alternative to MacPorts. It can be downloaded from the `official Python website <https://www.python.org/downloads/>`_.
65
+
Installing *vpype*
66
+
------------------
141
67
142
-
After running the Python installer, install pipx with the following command::
68
+
Once pipx is properly installed, you can install *vpype* with the following command::
143
69
144
-
$ sudo python3 -m pip install pipx
145
-
$ pipx ensurepath
70
+
pipx install "vpype[all]"
146
71
147
-
The second command above ensures that both pipx and the software it will install are available the terminal. You may need to close and re-open the terminal window for this to take effect.
72
+
*vpype* should now be installed and ready to use. You may check that it is fully functional by checking its version or displaying some random lines::
148
73
149
-
Then, install *vpype*::
150
-
151
-
$ pipx install "vpype[all]"
152
-
153
-
*vpype* should now be installed and ready to use. You may check that it is fully functional by checking its version and displaying some random lines::
154
-
155
-
$ vpype --version
156
-
vpype 1.9.0
157
-
$ vpype random show
74
+
vpype --version
75
+
vpype random show
158
76
159
77
160
78
Windows
@@ -165,88 +83,88 @@ Windows
165
83
Installing using the installer
166
84
------------------------------
167
85
168
-
A Windows installer for *vpype* is `available here <https://github.com/abey79/vpype/releases>`__. Although this installation method is the easiest, it **does not** allow plug-ins to be installed. If plug-ins are required, installing using pipx is recommended.
86
+
A Windows installer for *vpype* is `available here <https://github.com/abey79/vpype/releases>`__. Although this installation method is the easiest, it **does not** allow :doc:`plug-ins<plugins>` to be installed. If plug-ins are required, installing using pipx is recommended.
169
87
170
88
Installing using pipx
171
89
---------------------
172
90
173
-
First, Python must be installed. Python 3.10 is recommended, although *vpype* it is also compatible with Python 3.8 and later. The official Python distribution for Windows can be `downloaded here <https://www.python.org/downloads/>`__ or installed from the `App Store <https://www.microsoft.com/en-us/p/python-310/9pjpw5ldxlz5>`_. When installing Python, make sure you enable adding Python to the path.
91
+
First, install Python. The official Python distribution for Windows can be `downloaded here <https://www.python.org/downloads/>`__ or installed from the `App Store <https://www.microsoft.com/en-us/p/python-310/9pjpw5ldxlz5>`_. When installing Python, make sure you enable adding Python to the path.
92
+
93
+
.. caution::
94
+
95
+
When install Python, make sure to select version that is compatible with *vpype*. See the :doc:`top of this page <install>` for more information.
174
96
175
-
First, install pipx::
97
+
Then, install pipx::
176
98
177
-
> python -m pip install --user pipx
178
-
> pipx ensurepath
99
+
python -m pip install --user pipx
100
+
pipx ensurepath
179
101
180
102
In the first command, replace ``python`` by ``python3`` if you installed Python from the App Store. The second command above ensures that both pipx and the software it will install are available the terminal. You may need to close and re-open the terminal for this to take effect.
181
103
182
-
Then, install *vpype*::
104
+
Finally, install *vpype*::
183
105
184
-
> pipx install "vpype[all]"
106
+
pipx install "vpype[all]"
185
107
186
108
*vpype* should now be installed and ready to use. You may check that it is fully functional by checking its version and displaying some random lines::
187
109
188
-
> vpype --version
189
-
vpype 1.9.0
190
-
> vpype random show
110
+
vpype --version
111
+
vpype random show
191
112
192
113
Linux
193
114
=====
194
115
195
116
.. highlight:: bash
196
117
197
-
First, install `pipx`_ with your system's package manager. On Debian/ubuntu flavored installation, this is typically done as follows::
118
+
First, install `pipx`_ with your system's package manager. On Debian/Ubuntu flavored installation, this is typically done as follows::
198
119
199
-
$ sudo apt-get install pipx
120
+
sudo apt-get install pipx
200
121
201
122
Then run the following command to ensure your path variable is properly set::
202
123
203
-
$ pipx ensurepath
124
+
pipx ensurepath
204
125
205
126
You may need to close and re-open the terminal window for this to take effect.
206
127
207
128
Finally, install *vpype*::
208
129
209
-
$ pipx install "vpype[all]"
130
+
pipx install "vpype[all]"
210
131
211
132
*vpype* should now be installed and ready to use. You may check that it is fully functional by checking its version and displaying some random lines::
212
133
213
-
$ vpype --version
214
-
vpype 1.9.0
215
-
$ vpype random show
216
-
134
+
vpype --version
135
+
vpype random show
217
136
218
137
219
138
Raspberry Pi
220
139
============
221
140
222
-
Full installation including the viewer on the Raspberry Pi is no longer supported. Expert users may succeed with ``pip install vpype[all]`` provided that a suitable version of the PySide2 package is available. Also, the new viewer requires OpenGL 3.3, which the Raspberry Pi does not support. The classic viewer should work correctly::
141
+
Full installation including the viewer on the Raspberry Pi is no longer supported. Expert users may succeed with ``pipx install "vpype[all]"``. Also, the new viewer requires OpenGL 3.3, which the Raspberry Pi does not support. The classic viewer should work correctly::
223
142
224
-
$ vpype [...] show --classic
143
+
vpype [...] show --classic
225
144
226
145
Installing the CLI-only version described in the next section is easier and should be favored whenever possible. Here are the recommended steps to do so.
227
146
228
147
Some packages and their dependencies are easier to install at the system level::
For special cases where the :ref:`cmd_show` is not needed and dependencies such as matplotlib, PySide2, or ModernGL are difficult to install, a CLI-only version of *vpype* can be installed using this command::
165
+
For special cases where the :ref:`cmd_show` is not needed and dependencies such as matplotlib, PySide6, or ModernGL are difficult to install, a CLI-only version of *vpype* can be installed using this command::
248
166
249
-
$ pipx install vpype
167
+
pipx install vpype
250
168
251
169
Note the missing ``[all]`` compared the instructions above.
0 commit comments