How To Install torch-trepl on Ubuntu 18.04
Introduction
In this tutorial we learn how to install torch-trepl
on Ubuntu 18.04.
What is torch-trepl
torch-trepl is:
A pure Lua REPL (Read,Eval,Print-Loop) for LuaJIT, with heavy support for Torch types. It uses Readline for tab completion.
This package also installs command line frontend th
, which
comes packed with all these features:
- Tab-completion on nested namespaces
- Tab-completion on disk files (when opening a string)
- History
- Pretty print (table introspection and coloring)
- Auto-print after eval (can be stopped with ;)
- Each command is profiled, timing is reported
- No need for ‘=’ to print
- Easy help with:
? funcname
- Self help:
?
- Shell commands with: $ cmd (example:
$ ls
) - Print all user globals with
who()
- Import a package’s symbols globally with
import(package)
- Require is overloaded to provide relative search paths:
require('./mylocallib/')
- [Optional] strict global namespace monitoring
- [Optional] async repl
There are three methods to install torch-trepl
on Ubuntu 18.04. We can use apt-get
, apt
and aptitude
. In the following sections we will describe each method. You can choose one of them.
Install torch-trepl Using apt-get
Update apt database with apt-get
using the following command.
sudo apt-get update
After updating apt database, We can install torch-trepl
using apt-get
by running the following command:
sudo apt-get -y install torch-trepl
Install torch-trepl Using apt
Update apt database with apt
using the following command.
sudo apt update
After updating apt database, We can install torch-trepl
using apt
by running the following command:
sudo apt -y install torch-trepl
Install torch-trepl Using aptitude
If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude
using the following command.
sudo aptitude update
After updating apt database, We can install torch-trepl
using aptitude
by running the following command:
sudo aptitude -y install torch-trepl
How To Uninstall torch-trepl on Ubuntu 18.04
To uninstall only the torch-trepl
package we can use the following command:
sudo apt-get remove torch-trepl
Uninstall torch-trepl And Its Dependencies
To uninstall torch-trepl
and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:
sudo apt-get -y autoremove torch-trepl
Remove torch-trepl Configurations and Data
To remove torch-trepl
configuration and data from Ubuntu 18.04 we can use the following command:
sudo apt-get -y purge torch-trepl
Remove torch-trepl configuration, data, and all of its dependencies
We can use the following command to remove torch-trepl
configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge torch-trepl
References
Summary
In this tutorial we learn how to install torch-trepl
package on Ubuntu 18.04 using different package management tools: apt
, apt-get
and aptitude
.