Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

  • 5260202
  • /
  • doc
  • /
  • installation.rst
Raw File Download

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
content badge Iframe embedding
swh:1:cnt:6b7f69922f235e33505dbc84a5fe645e21262489
directory badge Iframe embedding
swh:1:dir:fdb31d2aea670b75141c74c18fdfa839954ca863

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
installation.rst
===================
Installing tensorly
===================


Pre-requisite
=============

The only non-optional pre-requisite is to have Python installed.

.. important::

   TensorLy is developed/tested only for Python3!

   If you are still using Python2, you probably want to upgrade!

If you are starting with Python or generally want a pain-free experience, I recommend you install the `Anaconda distribiution <https://www.anaconda.com/download/>`_. It comes with all you need shipped-in and ready to use!
   

Installing with pip (recommended)
=================================


Simply run, in your terminal::

   pip install -U tensorly

(the `-U` is optional, use it if you want to update the package).


Installing with Conda
=====================

You can also directly install tensorly using conda, from the tensorly channel::

   conda install -c tensorly tensorly

And that is you done! 

Cloning the github repository
=============================

Clone the repository and cd there::

   git clone https://github.com/tensorly/tensorly
   cd tensorly

Then install the package (here in editable mode with `-e` or equivalently `--editable`::

   pip install -e .

Running the tests
=================

Uni-testing is an vital part of this package.
You can run all the tests using `pytest`::

   pytest tensorly


Compiling the documentation
===========================

You will need to install slimit and minify::

   pip install slimit rcssmin

You are now ready to build the doc (here in html)::

   make html

The results will be in `_build/html`


Why Python 3?
=============

Short answer: it's 2018 (at the time of writing...)

Python 3 was first released **10 years** ago and, while breaking compatibility, it improved a lot of things.

To quote the `wiki <https://wiki.python.org/moin/Python2orPython3>`_:

   | Short version: Python 2.x is legacy, Python 3.x is the present and future of the language

In particular, have a look at the list of `what's new in Python (3) <https://docs.python.org/3/whatsnew/index.html>`_


back to top

Software Heritage — Copyright (C) 2015–2025, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API