-
Notifications
You must be signed in to change notification settings - Fork 3
Troubleshooting
It is possible that you encounter an error during the installation of Termsteel, this can be due to some multiple factors.
Some of the factors that are responsible for this are often repeated and here are the different cases where you might have an installation error:
It is very likely that when you throw Termsteel you will get this error :
Traceback (most recent call last):
File "C:\users\[You]\appdata\local\programs\python\python38-32\lib\runpy.py", line 192, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\users\[You]\appdata\local\programs\python\python38-32\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\[You]\AppData\Local\Programs\Python\Python38-32\Scripts\termsteel.exe\__main__.py", line 4, in <module>
File "C:\users\[You]\appdata\local\programs\python\python38-32\lib\site-packages\termsteel\app.py", line 9, in <module>
import pty
File "C:\users\[You]\appdata\local\programs\python\python38-32\lib\pty.py", line 11, in <module>
import tty
File "C:\users\[You]\appdata\local\programs\python\python38-32\lib\tty.py", line 5, in <module>
from termios import *
ModuleNotFoundError: No module named 'termios'
This error simply indicates that the termios module is missing to run Termsteel, this module is very important in the operation of Termsteel, it is him who provides the Pty (Pseudo-terminal utilities) which allows Termsteel through Python to interact with the terminal of your machine, which allows to retrieve the output of the terminal as well as to write an input.
Indeed I specified it in the installation page but there is currently no native version of Termsteel for Windows which means that you can't install Termsteel natively, however nothing is lost, you can always install it using a linux subsystem on your Windows via WSL
Note: A future update of Termsteel will include native Windows and Docker support for Termsteel, stay tuned.
I made a page explaining how to install Termsteel via Windows from WSL I invite you to see it:
it is possible that when you launch termsteel you receive the following error
Traceback (most recent call last):
File "/usr/local/bin/termsteel", line 33, in <module>
sys.exit(load_entry_point('termsteel==0.0.1.post0', 'console_scripts', 'termsteel')())
File "/usr/local/bin/termsteel", line 22, in importlib_load_entry_point
for entry_point in distribution(dist_name).entry_points
File "/usr/lib/python3.9/importlib/metadata.py", line 524, in distribution
return Distribution.from_name(distribution_name)
File "/usr/lib/python3.9/importlib/metadata.py", line 187, in from_name
raise PackageNotFoundError(name)
importlib.metadata.PackageNotFoundError: termsteel
Know that Termsteel is effectively installed when you receive this error on your machine because you can launch it from your site-packages which corresponds to the set of your python libraries. The problem I know is that pip doesn't create correctly the command file that links the termsteel library to the command, which is particularly annoying because it doesn't come especially from me but from pip which does its job badly... To solve this problem I invite you to do like me below or to install it via my dedicated installation script.
First of all, start to locate where the command is by using this command: ``whereis termsteel```
In my case it is /usr/local/bin/termsteel
for all my users on my linux machine
Ok let's delete it with this command:
sudo rm /usr/local/bin/termsteel
Will rewrite this file but this time with the right line...
Edit the file directly as sudo with nano :
sudo nano /usr/local/bin/termsteel
and paste theses lines on your file :
#!/usr/bin/python3
# EASY-INSTALL-ENTRY-SCRIPT: 'termsteel==0.0.1.post0','console_scripts','termsteel'
import re
import sys
# for compatibility with easy_install; see #2198
__requires__ = 'termsteel==0.0.1.post0'
try:
from importlib.metadata import distribution
except ImportError:
try:
from importlib_metadata import distribution
except ImportError:
from pkg_resources import load_entry_point
def importlib_load_entry_point(spec, group, name):
dist_name, _, _ = spec.partition('==')
matches = (
entry_point
for entry_point in distribution(dist_name).entry_points
if entry_point.group == group and entry_point.name == name
)
return next(matches).load()
globals().setdefault('load_entry_point', importlib_load_entry_point)
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(load_entry_point('termsteel==0.0.1.post0', 'console_scripts', 'termsteel')())
After that install again all the dependencies of termsteel with this command:
wget -q https://raw.githubusercontent.com/afi-dev/Termsteel/main/requirements.txt && sudo pip install -r requirements.txt && rm requirements.txt
Now retry termsteel command, its normaly work now
If it really doesn't work use my dedicated installation script using this command:
curl -sSL https://raw.githubusercontent.com/afi-dev/Termsteel/main/installer.sh | sudo bash
It is possible that if you are here you have received this frustrating error :
This error simply means that Termsteel is not officially installed on your machine, more precisely it indicates that the Termsteel command does not exist, which shows that something went wrong during installation
Indeed I would have integrated a precise error system, but there are so many possible factors that it's almost impossible to do something 100% reliable
So you can try the following solutions, I tried myself to reproduce several cases and indeed I could determine some things that cause these errors, here they are
- 1. The error occurs when python is not installed correctly
To do this, check that python3 is installed, not version 2.x but version 3.x, check that python3 is installed by typing this command:
python3 -v
If it python3 is not installed install it.
- 2. The error occurs (often) when pip is not installed correctly
Pip is needed for installation. sometimes pip is not installed correctly when installing python3, if this happens install manualy like this:
sudo apt install python3-pip
and check if is installed with:
pip -v
If this does not work, install the pip installer and run it like this
wget https://bootstrap.pypa.io/get-pip.py
python3 get-pip.py
If you get an error like this:
...
ModuleNotFoundError: No module named 'distutils.cmd'
correct it using this guide
and check if is installed with:
pip -v
Once done, try again the installation and everything should work fine*
- 3. Check the writing rights
It happens sometimes without any reason that Termsteel is installed but that Python doesn't have the permission to write in the modules directory so give the writing rights using this command :
sudo chown -R $USER /usr/local/lib/[Your python path version (ex:python38)]/dist-packages/
Once done, try again the installation and everything should work fine*
Create an issue on Github and I'll come help you as much as I can... Inside, Please explain the problem in detail and how you installed Termsteel so that i can find the problem.