Trying to install Trity-1 and i get a pip error. I'm using Linux. Below is the traceback-
[*] Loading...
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package python-pip is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
python3-pip
E: Package 'python-pip' has no installation candidate
sh: 1: easy_install: not found
Traceback (most recent call last):
File "install.py", line 31, in <module>
import pip
ImportError: No module named pip
I don't believe python-pip exists anymore. Try-
sudo apt-get install python3-pip
this is a full setup of trity in kali linux
step by step
try to write this command line
(1) sudo su (for gaining root permission)
(2) git clone the file of trity
link:git clone https://github.com/aymankhalfatni/Trity.git
then
(3)check the present working DIRS
(4)then there you see the trity folder write "cd Trity"
(5)then you will enter the trity folder, there you may see a file named "README.MD"
(6)write the command cat README.MD there willl be a small information on how to install the file of trity
(7)after reading the file go back and write "install.py"
(8)there you may enter the trity app
(9)write 1 for kali linux
(10)if it shows a error check whether you have python installed in your kali linux or not
FOR INSTASLLING PYTHON ON KALI LINUX
(1) write apt-get install python3
(2)if it says its already installed then wirte "apt-upgrade python3"
then the error may be fixed and you can install trity
If there is older version of python ie 2.7.18 remove that
Type >> sudo apt purge -y python2-minimal
install version 3.8 ie latest
Type >> sudo apt install -y python3-pip
latest version of python is installed!
Related
i use this little script from https://stackoverflow.com/a/63396200/2891692
in the new installed Ubuntu i installed python3-autopilot again (sudo apt-get install python3-autopilot).
seems i have the newest version:
python3-autopilot is already the newest version (1.6.0+17.04.20170313-0ubuntu8).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
but my python script here
from autopilot.input import Mouse
gives to following error:
Script name: 'autopilot-test'
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/autokey/service.py", line 485, in execute
exec(script.code, scope)
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'autopilot.input'
i tried proposals for this problem from https://askubuntu.com/a/316103/1017209
but they dont't work for me, as you could see below:
1.
sudo apt-add-repository ppa:autopilot/ppa
sudo apt-get update
sudo apt-get install libautopilot-qt python-autopilot
Package libautopilot-qt is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'libautopilot-qt' has no installation candidate
E: Unable to locate package python-autopilot
dpkg -l python-autopilot
dpkg-query: no packages found matching python-autopilot
first test it i new Kubuntu then try reinstall al python stuff
as test i installed Kubuntu on other HDD (today (2021-02-28) and my mouse-autopilot-test.py works like expected.
then (2021-02-28) i tried repair my working OS like so (without success) :
uninstall python3 - both configuration and data files of python3.x and it's dependencies (takes some minute):
sudo apt-get purge --auto-remove python3.*
try reinstall my most used pyton
sudo apt install --reinstall python3-pkg-resources python3-setuptools
sudo apt-get install autokey-qt
sudo apt-get install python3-autopilot
error when running mouse-autopilot-test.py :
ModuleNotFoundError: No module named 'autopilot.input'
what could i do to fix that?
I have installed python3.5 on my server. I installed pysher with pip3, everything works fine, in python3.5 terminal, I can use import pysher without error. Now, I develop script, where is some python3.6 features, so I installed python3.6 on my server and now, I am not able to import pysher in python3.6 terminal:
>>> import pysher
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'pysher'
So I tried install pysher again:
# pip3 install pysher
The program 'pip3' is currently not installed. You can install it by typing:
apt install python3-pip
Even when I konw I have installed python3-pip, I tried it agian:
# apt install python3-pip
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3-pip is already the newest version (8.1.1-2ubuntu0.4).
0 upgraded, 0 newly installed, 0 to remove and 138 not upgraded.
Of course, I can rewrite my second script to work with python3.5, but I am curious why it is not working and how to repair it.
UPDATE 1:
dpkg -L python3-pip | grep bin
/usr/bin
/usr/bin/pip3
export PATH="$PATH:/usr/bin/pip3"
pip3 search pysher
The program 'pip3' is currently not installed. You can install it by typing:
apt install python3-pip
This did not work, so I try get version of pip3:
# /usr/bin/pip3 --version
-bash: /usr/bin/pip3: No such file or directory
pip3 is not in /usr/bin/.
Run dpkg -L python3-pip to find out where apt installed your pip3. Then
export PATH="$PATH:/usr/bin/mypippath
Will add it to your path. After that, trypip3 again.
There is two way to work with pip files.
1 - Inside of a program file like this :
import pip
pip.main(["install" , "package"])
2 - Getting into the scripts folder in Python directory and command line and printing the following content :
C:\Python\Python35\Scripts\pip.exe install package
When I try:
sudo add-apt-repository ppa:kirillshkrogalev/ffmpeg-next
in Ubuntu, the terminal show this error message:
Traceback (most recent call last):
File "/usr/bin/add-apt-repository", line 11, in <module>
from softwareproperties.SoftwareProperties import SoftwareProperties, shortcut_handler
File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 27, in <module>
import apt_pkg
ImportError: No module named 'apt_pkg'
I have two version of python, one is 2.7 the other is 3.5 .
How can I install this package on python3.5?
I had something quite different than this. Mine failed with
No module named 'softwareproperties'
My solution is:
sudo vim /usr/bin/add-apt-repository
Change package header from `python3` to `python3.4` (or lower)
This may happen when you recently upgraded or added another python3 package.
ubuntu 18.04:
sudo vim /usr/bin/add-apt-repository
Change package header from python3 to python3.6
it's work for me
Just chiming in since the version numbers may have changed.
Summary of fix: pointing my python3 to python 3.5 instead of 3.6
cd /usr/bin
rm python3
ln -s python3.5 python3
Detail: I had this same problem and found that /usr/bin/add-apt-repository had a shebang hint to use /usr/bin/python3 which is pointing to 3.6. However I also have 3.5 on my system and have to toggle them often, so I toggled it back and add-apt-repository now works.
I had the same issue with Ubuntu 20.04 and python3 pointing to python3.6.
I don't like to edit system file or similar (eg. /usr/bin/add-apt-repository) and change symlinks of certain commands (python is quite "special"). I suggest to follow the Ubuntu way to manage alternative versions of same command.
I had python3 pointing to python3.6 but python3.8 installed too so I updated alternatives to make coexist 3.6 and 3.8.
My proposed solution is to make python3 pointing to last installed version you have using thee "Ubuntu way" managing alternative.
Install last python3 version available. Mabe you have it or maybe you don't.
sudo apt update && sudo apt upgrade && sudo apt install python3
Check now which is your version of python3
python3 --version
If it pointing to last (eg. 3.8), you should solved your problem. If python3 is still pointing to a lower version (eg. 3.6), check where last is...
which python3.8
Now managing python 3 alternatives. Check if alternatives about python3 exists.
sudo update-alternatives --config python3
If some are listed, check if last version installed is in and if it is choose it and you should solve your problem. Otherwise remember the highest value of Priority. Ubuntu will use the alternative with highest value. Exit typing Enter button.
Add last version installed as alternative. Here I use the dicimal part of version as priority. The command need python3
sudo update-alternatives /usr/bin/python3 python3 /usr/bin/python3.8 8
If you need, add the others version of python3... (lower priority!!!)
Now your python3 is pointing to last version available in "Ubuntu style". (and the problem should be solved).
IMO, there is a neater solution to bypass the modification of a system file: sudo apt-get install --reinstall python3-apt.
If you are using UBUNTU, change to python3.8 version or install it
sudo apt install python3.8-dev
and after run
sudo apt-get install software-properties-common
I have found that everything that contains
ModuleNotFoundError: No module named 'apt_pkg'
Reading package lists... Done
Is a Python issue. To resolve it, one must set the correct python version. It depends on many factors what "correct version" means
Check python versions in the system
sudo apt list --installed | grep python*
Find what is at /usr/bin
ls -lha /usr/bin/python*
Locate the Python file that is generating the error
Traceback (most recent call last):
File "/usr/BAR/FOO # Is a python file and it varies
# For the case in this question the file is at
# /usr/bin/add-apt-repository
Open the file with sudo and add the "correct python version"
#!/usr/bin/python3.6
# Above should be the first line of the file
This worked for me :
sudo apt-get install python3-apt --reinstall
cd /usr/lib/python3/dist-packages
sudo cp apt_pkg.cpython-38-x86_64-linux-gnu.so apt_pkg.so
I'm getting this error when trying to install any package with pip. I have two pip instances, one with Python 2.7 and other with Python 3.
Could not import setuptools which is required to install from a source distribution.
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/pip/req/req_install.py", line 375, in setup_py
import setuptools # noqa
File "/usr/local/lib/python2.7/dist-packages/setuptools/__init__.py", line 11, in <module>
from setuptools.extern.six.moves import filterfalse, map
File "/usr/local/lib/python2.7/dist-packages/setuptools/extern/__init__.py", line 1, in <module>
from pkg_resources.extern import VendorImporter
ImportError: No module named extern
Even when I try to install the 'extern' module I get this error. Also when installing with Python itself, like python setup.py install.
Thanks in advance.
sudo apt-get purge python-pkg-resources
sudo apt-get -f install
here actually packages are removed and
purged (any configuration files are deleted too).
-f : Attempt to correct a system with broken dependencies in place.
sudo pip install packagename
#sourcehere
Do this it will work
sudo pip install -U setuptools
I know this is an old thread, but I just wanted to contribute since I ran into this issue and this thread kept coming up in the results.
Note: This was on MacOS 10.12. My shell is zsh and I already have brew installed
First I ran each of these commands
brew install python
brew install python3
This will either install it or you'll receive an "already installed" message as I did.
Next, run the following command
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
And last:
sudo python get-pip.py
Final note: for my install to work, I ended up having to run the command with pip3
sudo pip3 install nameofinstallhere
Not sure whether it is installation issue or packege but it seems like you will not be able to import any package of them, if you have installed python perfectly then
try this commands
step 1 :
$which pip
/usr/local/bin/pip
step 2 :
/usr/local/bin/pip install django
or any of your package name.
I am considering ubuntu(OS)
You can try the following command; it has worked for me:
sudo apt-get install --reinstall python-setuptools
I need help installing pydasm into python 2.7. The readme.txt file tells me that I have to enter python setup.py build_ext into the cli. When I do, I get the error:
Traceback (most recent call last):
File "setup.py", line 22, in <module>
raise DistutilsPlatformError()
distutils.errors.DistutilsPlatformError
If you can help, please let me know!
Since no one answered my question, I thought I would so if other people have the same issue they can look here for help.
I went to this site: http://ademata.blogspot.com/2010/07/installing-pydasm-and-pefile-module-on.html
Follow these instructions:
Pydasm is included with the module libdasm. An open source fork is available at http://libdasm.googlecode.com/svn/trunk/ svn/libdasm-read-only and requires the use of the subversion tool. To install subversion use sudo apt-get install subversion.
Run the following command to download the latest libdasm code:
svn checkout http://libdasm.googlecode.com/svn/trunk/ svn/libdasm-read-only
Run the following series of commands to install the module on python:
cd svn/libdasm-read-only/
make
sudo make install
cd pydasm
sudo apt-get install python2.6-dev
(use the most recent, so for me I did 2.7)
python setup.py build_ext
sudo python setup.py install
Pefile is included in Ubuntu's repository, to install the pefile module run sudo apt-get install python-pefile.
Hope this helped.