Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy
 

How to install petsc4py via python pip




petsc4py - PETSc for Python, it belongs to Classifiers:

- Programming Language :: C
- Programming Language :: C++
- Programming Language :: Cython

When you know about this project and you want to new install petsc4py to support your project or you get trouble as ModuleNotFoundError: No module named "petsc4py" or ImportError: cannot import name "petsc4py" in your project, let follow this tutorial to install petsc4py



Installation:

Step 1: First, ensure you installed pip in your os, to check pip has been installed on your computer

In Windows (CMD):

py -m pip --version

In Unix/macOS:

python3 -m pip --version

Ensure pip, setuptools, and wheel are up to date:

In Windows (CMD):

py -m pip install --upgrade pip setuptools wheel

In Unix/macOS:

python3 -m pip install --upgrade pip setuptools wheel


Optional - If you want to install in virtual environment:

In Windows (CMD):

- Install virtualenv - if you installed it, please ignore

py -m pip install --user virtualenv

- Create a virtual environment

py -m venv test_petsc4py_env

- Active the virtual environment

test_petsc4py_env\Scripts\active

In Unix/macOS:

- Install virtualenv - if you installed it, please ignore

pip3 install virtualenv

- Create a virtual environment

python3 -m venv test_petsc4py_env

- Active the virtual environment

source test_petsc4py_env/bin/active


Step 2: OK, now, let flow below content to start the installation petsc4py

To install petsc4py on Windows(CMD):

py -m pip install petsc4py

To install petsc4py on Unix/macOs:

pip install petsc4py


Step 3: If you want to install a specific petsc4py version, add ==<petsc4py version> to the end command line

Example:

pip install petsc4py==0.6.0


Please see the version list below table:

VersionReleased dateCommand
petsc4py 3.17.42022-08-02T11:59:40Windows:

py -m pip install petsc4py==3.17.4

Unix/macOs:

pip install petsc4py==3.17.4

petsc4py 3.17.32022-07-03T08:16:10Windows:

py -m pip install petsc4py==3.17.3

Unix/macOs:

pip install petsc4py==3.17.3

petsc4py 3.17.22022-06-05T09:55:07Windows:

py -m pip install petsc4py==3.17.2

Unix/macOs:

pip install petsc4py==3.17.2

petsc4py 3.17.12022-05-19T06:21:16Windows:

py -m pip install petsc4py==3.17.1

Unix/macOs:

pip install petsc4py==3.17.1

petsc4py 3.17.02022-04-08T08:50:37Windows:

py -m pip install petsc4py==3.17.0

Unix/macOs:

pip install petsc4py==3.17.0

petsc4py 3.16.62022-04-01T10:49:52Windows:

py -m pip install petsc4py==3.16.6

Unix/macOs:

pip install petsc4py==3.16.6

petsc4py 3.16.52022-03-15T18:02:59Windows:

py -m pip install petsc4py==3.16.5

Unix/macOs:

pip install petsc4py==3.16.5

petsc4py 3.16.42022-03-15T18:02:54Windows:

py -m pip install petsc4py==3.16.4

Unix/macOs:

pip install petsc4py==3.16.4

petsc4py 3.16.32022-03-15T18:02:51Windows:

py -m pip install petsc4py==3.16.3

Unix/macOs:

pip install petsc4py==3.16.3

petsc4py 3.16.22022-03-15T18:02:48Windows:

py -m pip install petsc4py==3.16.2

Unix/macOs:

pip install petsc4py==3.16.2

petsc4py 3.16.12021-11-19T17:36:31Windows:

py -m pip install petsc4py==3.16.1

Unix/macOs:

pip install petsc4py==3.16.1

petsc4py 3.16.02021-10-03T10:55:43Windows:

py -m pip install petsc4py==3.16.0

Unix/macOs:

pip install petsc4py==3.16.0

petsc4py 3.15.12021-09-04T09:31:34Windows:

py -m pip install petsc4py==3.15.1

Unix/macOs:

pip install petsc4py==3.15.1

petsc4py 3.15.02021-04-03T09:10:18Windows:

py -m pip install petsc4py==3.15.0

Unix/macOs:

pip install petsc4py==3.15.0

petsc4py 3.14.12021-01-13T16:20:07Windows:

py -m pip install petsc4py==3.14.1

Unix/macOs:

pip install petsc4py==3.14.1

petsc4py 3.14.02020-10-13T09:50:34Windows:

py -m pip install petsc4py==3.14.0

Unix/macOs:

pip install petsc4py==3.14.0

petsc4py 3.13.02020-04-04T14:23:55Windows:

py -m pip install petsc4py==3.13.0

Unix/macOs:

pip install petsc4py==3.13.0

petsc4py 3.12.02019-10-11T08:41:54Windows:

py -m pip install petsc4py==3.12.0

Unix/macOs:

pip install petsc4py==3.12.0

petsc4py 3.11.02019-04-14T10:04:23Windows:

py -m pip install petsc4py==3.11.0

Unix/macOs:

pip install petsc4py==3.11.0

petsc4py 3.10.12019-01-27T06:18:29Windows:

py -m pip install petsc4py==3.10.1

Unix/macOs:

pip install petsc4py==3.10.1

petsc4py 3.10.02018-09-16T10:55:13Windows:

py -m pip install petsc4py==3.10.0

Unix/macOs:

pip install petsc4py==3.10.0

petsc4py 3.9.12018-05-02T08:27:45Windows:

py -m pip install petsc4py==3.9.1

Unix/macOs:

pip install petsc4py==3.9.1

petsc4py 3.9.02018-04-22T07:51:44Windows:

py -m pip install petsc4py==3.9.0

Unix/macOs:

pip install petsc4py==3.9.0

petsc4py 3.8.12017-11-06T06:48:16Windows:

py -m pip install petsc4py==3.8.1

Unix/macOs:

pip install petsc4py==3.8.1

petsc4py 3.8.02017-10-02T05:17:42Windows:

py -m pip install petsc4py==3.8.0

Unix/macOs:

pip install petsc4py==3.8.0

petsc4py 3.7.02016-05-01T14:03:37Windows:

py -m pip install petsc4py==3.7.0

Unix/macOs:

pip install petsc4py==3.7.0

petsc4py 3.6.02015-07-05T07:27:37Windows:

py -m pip install petsc4py==3.6.0

Unix/macOs:

pip install petsc4py==3.6.0

petsc4py 3.5.12014-12-29T22:27:57Windows:

py -m pip install petsc4py==3.5.1

Unix/macOs:

pip install petsc4py==3.5.1

petsc4py 3.52014-08-17T13:20:43Windows:

py -m pip install petsc4py==3.5

Unix/macOs:

pip install petsc4py==3.5

petsc4py 3.42013-08-29T09:06:47Windows:

py -m pip install petsc4py==3.4

Unix/macOs:

pip install petsc4py==3.4

petsc4py 3.3.12013-03-13T12:18:17Windows:

py -m pip install petsc4py==3.3.1

Unix/macOs:

pip install petsc4py==3.3.1

petsc4py 3.32012-07-26T16:51:38Windows:

py -m pip install petsc4py==3.3

Unix/macOs:

pip install petsc4py==3.3

petsc4py 1.22011-09-27T14:07:28Windows:

py -m pip install petsc4py==1.2

Unix/macOs:

pip install petsc4py==1.2

petsc4py 1.1.22010-10-01T17:41:21Windows:

py -m pip install petsc4py==1.1.2

Unix/macOs:

pip install petsc4py==1.1.2

petsc4py 1.1.12010-09-14T22:35:34Windows:

py -m pip install petsc4py==1.1.1

Unix/macOs:

pip install petsc4py==1.1.1

petsc4py 1.12010-04-06T15:31:01Windows:

py -m pip install petsc4py==1.1

Unix/macOs:

pip install petsc4py==1.1

petsc4py 1.0.32010-02-26T17:19:08Windows:

py -m pip install petsc4py==1.0.3

Unix/macOs:

pip install petsc4py==1.0.3

petsc4py 1.0.22009-03-31T18:11:59Windows:

py -m pip install petsc4py==1.0.2

Unix/macOs:

pip install petsc4py==1.0.2

petsc4py 1.0.12008-12-29T20:16:25Windows:

py -m pip install petsc4py==1.0.1

Unix/macOs:

pip install petsc4py==1.0.1

petsc4py 0.7.52007-08-04T22:09:02Windows:

py -m pip install petsc4py==0.7.5

Unix/macOs:

pip install petsc4py==0.7.5

petsc4py 0.7.42007-05-30T16:49:28Windows:

py -m pip install petsc4py==0.7.4

Unix/macOs:

pip install petsc4py==0.7.4

petsc4py 0.7.22007-01-30T21:31:18Windows:

py -m pip install petsc4py==0.7.2

Unix/macOs:

pip install petsc4py==0.7.2

petsc4py 0.7.12007-01-30T15:45:18Windows:

py -m pip install petsc4py==0.7.1

Unix/macOs:

pip install petsc4py==0.7.1

petsc4py 0.7.02006-12-15T23:47:13Windows:

py -m pip install petsc4py==0.7.0

Unix/macOs:

pip install petsc4py==0.7.0

petsc4py 0.6.32006-11-25T00:18:29Windows:

py -m pip install petsc4py==0.6.3

Unix/macOs:

pip install petsc4py==0.6.3

petsc4py 0.6.02006-08-12T00:57:43Windows:

py -m pip install petsc4py==0.6.0

Unix/macOs:

pip install petsc4py==0.6.0


Step 4: Otherwise, you can install petsc4py from local archives:

Download the distribution file from petsc4py-3.17.4.tar.gz or the specific petsc4py version in the below list of distribution

After that, install by command:

On Windows(CMD):

py -m pip install <path_to_petsc4py_downloaded_file>

On Unix/macOs:

pip install <path_to_petsc4py_downloaded_file>


List distribution:


Project link:

- Homepage
- Download