Skip to content

How to Install Python Packages into CoCalc

William Stein edited this page Nov 10, 2017 · 12 revisions

About Python Packages in CoCalc

You may need to install a Python package in a CoCalc project.

CoCalc already includes hundreds of packages for several Python development environments.

If a package may have general use but is not already installed in CoCalc, you can open a support request to install it. Uncomplicated install requests are typically handled within 1 business day for paying customers. Install will happen faster if you include as much as possible of the following information:

  • python 2 or python 3 language version
  • link to package website
  • special requirements and dependencies to build & install
  • include a complete example that we can easily use to verify that we properly installed the software.

You can install additional packages yourself, but only at user-permission level. CoCalc accounts do not have superuser (root) privileges. Software must be installed into user-writeable parts of the filesystem.

How to install Python packages as a CoCalc user

Note: use pip3, or python3 below for installing into Python 3 environments.

pip

If your package can be installed with pip, then use pip install --user ....

setup.py

If your package is in a folder with a setup.py folder, you can do either python setup.py install --user or pip install --user --upgrade ./

virtualenv

You can avoid the need for --user flags if you work inside a Python virtual environment. See Virtualenv for more information.

Clone this wiki locally