Skip to content

Commit 8d10631

Browse files
authored
Merge pull request #1089 from CadQuery/readme
Updating the readme for new pip install instructions
2 parents 893c799 + cd91d57 commit 8d10631

File tree

2 files changed

+37
-1
lines changed

2 files changed

+37
-1
lines changed

README.md

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,42 @@ It is currently possible to use CadQuery for your own projects in 3 different wa
4444
* Linux [installation video](https://youtu.be/sjLTePOq8bQ)
4545
* Windows [installation video](https://youtu.be/3Tg_RJhqZRg)
4646

47-
The easiest way to install CadQuery and its dependencies is using conda, which is included as part of a [miniforge](https://github.com/conda-forge/miniforge) installation (other distributions can be used as well). See the next section for more details regarding conda. The steps to install cadquery are as follows:
47+
There are two ways to install CadQuery and its dependencies. One is using conda, and the other is using pip. Pip is shown first below, followed by two sections on installing CadQuery via conda, and a non-intrusive way to install conda on a system.
48+
49+
### CadQuery Installation Via Pip
50+
51+
CadQuery has a complex set of dependencies including OCP, which is our set of bindings to the OpenCASCADE CAD kernel. OCP is distributed as binary wheels for Linux, MacOS and Windows. However, there are some limitations. Only Python 3.8 through 3.10 are currently supported, and some older Linux distributions such as Ubuntu 18.04 are not supported. If the pip installation method does not work for your system, you can try the conda installation method outlined in the next two sections.
52+
53+
It is highly recommended that a virtual environment is used when installing CadQuery, although it is not strictly required. Installing CadQuery via pip requires a up-to-date version of pip, which can be obtained with the following command line (or a slight variation thereof).
54+
```
55+
python3 -m pip install --upgrade pip
56+
```
57+
Once a current version of pip is installed, CadQuery can be installed using the following command line.
58+
```
59+
pip install cadquery==2.2.0b0
60+
```
61+
Notice that the version number is pinned to a beta version. This is because CadQuery has only recently returned to PyPI, and a full release has not happened yet. When the final release of CadQuery 2.2 is published, it will be possible to simply type `pip install cadquery`. However, if the version number pin is not used for now, a 1.x version of CadQuery will be installed, which is extremely out of date.
62+
63+
It is also possible to install the very latest changes directly from CadQuery's GitHub repository, with the understanding that sometimes breaking changes can occur. To install from the git repository, run the following command line.
64+
```
65+
pip install git+https://github.com/CadQuery/cadquery.git
66+
```
67+
68+
You should now have a working CadQuery installation, but developers or users who want to use CadQuery with IPython/Jupyter or to set up a developer environment can read the rest of this section.
69+
70+
If you are installing CadQuery to use with IPython/Jupyter, you may want to run the following command line to install the extra dependencies.
71+
```
72+
pip install cadquery[ipython]==2.2.0b0
73+
```
74+
75+
If you want to create a developer setup to contribute to CadQuery, the following command line will install all the development dependencies that are needed.
76+
```
77+
pip install cadquery[dev]==2.2.0b0
78+
```
79+
80+
### CadQuery Installation Via Conda
81+
82+
conda is included as part of a [miniforge](https://github.com/conda-forge/miniforge) installation (other distributions can be used as well). See the next section for more details regarding conda. The steps to install cadquery are as follows:
4883
```
4984
# Set up a new environment
5085
conda create -n cadquery

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
author_email="[email protected]",
4747
description="CadQuery is a parametric scripting language for creating and traversing CAD models",
4848
long_description=open("README.md").read(),
49+
long_description_content_type="text/markdown",
4950
packages=find_packages(exclude=("tests",)),
5051
python_requires=">=3.8,<3.11",
5152
setup_requires=setup_reqs,

0 commit comments

Comments
 (0)