You could type the following at the command line, or put it in a shell script, say in ~/bin/ $HOME/.venv/thg/bin/python path/to/thg/thg Or we can run it from anywhere, without activating the virtualenv, by using the python from the virtualenv. Then we can clone the thg repository and build it: hg clone Īt this point we can run it directly. Note I have pinned mercurial at 5.4 because at the time of writing tortoisehg does not work with 5.5 Install packages into the virtualenv: pip install pyqt5 mercurial=5.4 qscintilla iniparse (You can create your virtualenv where ever you want.) Then create your virtualenv and start using it: python3 -m venv ~/.venv/thg This is very much based on the guide in the earlier answer, with some bits and pieces from other answers to this question.įirst install the required packages using apt: sudo apt install python3-pip python3-venv build-essential pyqt5.qsci-dev So here is a guide to do it that way, along with the desktop file. I decided to do this all with tortoisehg in a virtualenv. Update to set the Exec to the correct path of thg. Then add a file ~/.local/share/applications/thg.desktop (for current user) or /usr/share/applications/thg.desktop (for system-wide usage). You can do: sudo cp -R tortoisehg /usr/local/lib/python3.8/dist-packages $ thgĪbort: couldn't find tortoisehg libraries in Otherwise, TortoiseHg won't start with the following error. You must also copy the Python module tortoisehg inside the directory where you built TortoiseHg to one of the paths in PYTHONPATH ( PYTHONPATH is the path where Python searches for module files). It needs iniparse to parse and update the Mercurial configuration.Įither sudo apt-get install python3-iniparseĪlso, if you want to make TortoiseHg available as desktop application from menu or so, you can first copy thg into /usr/bin or /usr/local/bin. Icon=/path/to/thg_repo/icons/thg_logo.icoĪpart from confirming that the steps described by Gunther work well, I want to add that you also need to install iniparse to ensure TortoiseHg work properly. In this case, create the file /usr/share/applications/sktop Ĭategories=GNOME GTK Mercurial Development You may want to install WSL Windows Toolbar Launcher to launch TortoiseHg from Windows. Sudo apt install libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-render-util0 libxcb-xinerama0 libxcb-xkb1 libxkbcommon-x11-0 Pip install pyqt5 mercurial qscintilla iniparse Sudo ln -s /usr/bin/python3 /usr/bin/python Sudo apt install mercurial python3-pip build-essential pyqt5.qsci-dev IP=$(grep -m 1 nameserver /etc/nf | awk '') Configure the DISPLAY environment variable in ~/.bashrc.Assuming you installed and launched an X Server on Windows (e.g. I got tortoisehg working on three different Ubuntu 20.04 installations using this recipe.Ĭontains scripts for automating the tasks listed above.įor those running Ubuntu 20.04 on Windows Subsystem for Linux 2. sudo apt install python3-pip build-essential Pip3 is needed to fulfill all the build dependencies. $ sudo ln -s /usr/bin/python3 /usr/bin/python If not, you have to change the symlink /usr/bin/python to /usr/bin/python3.Ĭhange the symlink: $ sudo rm /usr/bin/python But using these instructions, it is rather easy to get tortoisehg working from source.Ĭheck that python -version returns a Python 3 interpreter. Įrrors were encountered while processing: Processing triggers for man-db (2.9.1-1). Processing triggers for hicolor-icon-theme (0.17-2). Processing triggers for mime-support (3.64ubuntu1). Processing triggers for desktop-file-utils (0.24-1ubuntu2). Processing triggers for gnome-menus (3.36.0-1ubuntu1). Tortoisehg depends on mercurial (= 2.7~) however:ĭpkg: error processing package tortoisehg (-install):ĭependency problems - leaving unconfigured ĭpkg: dependency problems prevent configuration of tortoisehg: Preparing to unpack tortoisehg_4.8.1-0.1_all.deb. 172882 files and directories currently installed.) Selecting previously unselected package tortoisehg. I'm trying to install tortoiseHG with: $ sudo dpkg -i tortoisehg_4.8.1-0.1_all.deb
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |