0

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/.

3
  • @mike.k have you read it? Commented Aug 2, 2018 at 15:28
  • How did you install python 3.6? It may have overwritten your system python2. Commented Aug 13, 2018 at 13:50
  • Hi, I installed it via apt-get install python3.6. Commented Aug 13, 2018 at 16:57

2 Answers 2

1

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.

Sign up to request clarification or add additional context in comments.

Comments

0

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 

1 Comment

HI, this could help, I tried to search package and --version of pip, it works fine, but do not solve my problem. I can't install package from program every time.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.