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
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?
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!
This question already has answers here:
pip: no module named _internal
(30 answers)
Closed last month.
Today, I installed Pipenv via
pip install pipenv
As mentioned in the documentation I went to a test directory and created a new virtual environment using
pipenv shell
and tried to install a package via
pipenv install numpy
I got the following error message:
Installing numpy…
⠧
Error: An error occurred while installing numpy!
Traceback (most recent call last):
File "/Users/florian/.local/share/virtualenvs/test-bJfQ6Jzk/bin/pip", line 7, in <module>
from pip._internal import main
ModuleNotFoundError: No module named 'pip._internal'
This error occurs even after reinstalling pipenv, deleting all files and recreate the environment. It also had no impact if I ran pipenv install numpy inside or outside the environment.
Python 3.6.3
Pipenv 11.10.1
Thank you in advance.
I have had the same issue (python 3.5/Ubuntu 16.04LTS). Reinstalling pip with:
sudo apt install python-pip python-pip3 --reinstall
didn't solve the issue with me.
What worked in my case was reinstalling pipenv itself, from pip:
sudo pip3 install pipenv --force-reinstall
If you are running python 2.x or if your system is different than mine, you can try to replace pip3 with pip in the command:
sudo pip install pipenv --force-reinstall
Ubuntu 18.04, Python 3.6 :
Reinstalling pipenv did not work for me. Reinstall pip3 was the only issue, but
sudo apt install python3-pip
did not work too. Found a link to get pip3 in AskUbuntu.com which worked fine :
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
sudo python3 get-pip.py --force-reinstall
After trying around for a while, I fully reinstalled pip. This solved the problem and everything is working now as expected.
Before providing the two commands, which solved the problem, I want to specify some things:
I'm on MacOS
python stands for python3 (added an alias for that, because I only use python3)
pip is on version 9 and NOT 10
Here are both commands:
sudo pip uninstall pip
sudo python get-pip.py
I resolved problem using this command:
pip3 install pipenv --upgrade
The environment pipenv is trying to use may be corrupt for the current project.
Removing it, and re-running pipenv install worked in my case. I am on Fedora 35, where the python virtualenvs are located in ~/.local/share/virtualenvs/, this may be different in your case.
find out which virtualenvs are on your disk:
ls ~/.local/share/virtualenvs/
remove the ones belonging to your project:
rm -rf ~/.local/share/virtualenvs/yourprojectname*
I'm trying to install the module aiohttp for python so I can set up a system for downloading files with uvloop. I'm having some difficulty, though, when I go into my folder which I extracted aiohttp to and doing the following commands:
sudo python3 setup.py install
Traceback (most recent call last):
File "setup.py", line 5, in <module>
from setuptools import setup, Extension
ImportError: No module named 'setuptools'
I looked around and saw that some people had this problem but it was fixed by getting the python-setuptools or python3-setuptools package. So I tried to do that but this is the output I get:
$ sudo apt-get install python3-setuptools
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3-setuptools is already the newest version.
python3-setuptools set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
$ sudo apt-get install python-setuptools
Reading package lists... Done
Building dependency tree
Reading state information... Done
python-setuptools is already the newest version.
python-setuptools set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
Which leads me to believe that python-setuptools is already installed! I'm not sure where to go from here. Just for clarity, I did try
sudo python setup.py install
but I received an error because Python 3.4.1+ is needed to install aiohttp:
sudo python setup.py install
Traceback (most recent call last):
File "setup.py", line 61, in <module>
raise RuntimeError("aiohttp requires Python 3.4.1+")
RuntimeError: aiohttp requires Python 3.4.1+
I'm running Linux Mint 17.2 Qiana on an HP Elitebook 8440p. Any suggestions as to what I should do?
Thanks in advance!
First Install python3
brew install python3 && cp /usr/local/bin/python3 /usr/local/bin/python
Then use pip3 to install aiohttp
pip3 install aiohttp
sudo dnf install python-devel-2.7.12-6.fc24.x86_64 solved my problem
For me installing uvloop worked, working on Mac laptop:
pip install uvloop
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