-
Notifications
You must be signed in to change notification settings - Fork 217
How to Install Python Packages into 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.
Note regarding Python 2 vs. Python 3:
- Python 2: use
pip2
orpython2
--pip
andpython
should default to these variants. - Python 3: use
pip3
orpython3
below.
If your package can be installed with pip
, then use pip install --user [package-name]
.
Your project must have the "Internet access" upgrade in order to download software from the pip repository to your project. The Python pip command will not work unless you upgrade your project to have internet access.
If your package is in a folder inside your project (e.g., you uploaded it) with a setup.py
folder, you can do either python setup.py install --user
or pip install --user --upgrade ./
If pip requires that any external dependencies be downloaded, then your project must have internet access.
You can avoid the need for --user
flags if you work inside a Python virtual environment. See Virtualenv for more information.
This Wiki is for CoCalc.com.
A more structured documentation is the CoCalc User Manual.
For further questions, please contact us.