
i could be totally wrong, and please correct me if i am, but try this: target: this will give you a current twisted / python installation and keep the packages seperate from the system ones # 1. install a package called virtualenv and pip on your system apt install virtualenv pip # 2. create a directory for your project, if you dont have one already, # to keep it seperate from other code mkdir yourproject # 3. create a virtualenv for your project, -p sets the python version # to use and "venv" is just the directory virtualenv installs the # python environment to virtualenv -p /usr/bin/python3 venv # 4. activate that environment (your command prompt will # change to: (venv)... source venv/bin/activate # 5. install twisted (while still being in the same terminal window # and directory with your activated virtual environment pip install twisted now you can code as usuall and run your code with python mycode.py, try python --version # 6. if you want to use trial for testing run: hash -r #to update the path settings, because trial is installed by the system twisted package as well and without the hash -r your env will still find the system trial first