LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-16-2019, 04:26 PM   #1
CatDog
LQ Newbie
 
Registered: Oct 2018
Posts: 15

Rep: Reputation: Disabled
Trying to install Python 3.7.2 and pip


Moderately new to linux, I’m running Lubuntu 18.4 bionic beaver
I want to install and run a program that requires python 3.7 with pip.
I finally got the program installed and running on windows.
Now I’m trying to get it setup on Linux

When I try to set up this program, and I type in the command, which contains “pip” I get an error telling me there is no pip.

I was constantly getting this error in windows. Turns out, my system, no matter how I set my environment variables, was using the wrong version of python, and cmd would not except version specific statements like “python3.7” or “python37”. I finally got that fixed by reinstalling it and checking “set python path” on the installer (I missed that the first time I installed it because I didn’t know what it meant).

Linux has no such GUI installer for python (at least none that I can find). But it does let me choose the speciffic version to run. If I type “python3.7” it tells me I am running Python 3.7.2
So that works.

By using this command “ls -ls /usr/bin/python*” it lists all versions and it tells me 3.7.2 is located at
/usr/lib/python3.7
OK, all other python versions are in /user/bin/

I installed pip via “sudo apt-get install python-pip”

Here’s the problem, when I run the command for this program, it is still telling me it can’t find pip.
I check the /usr/bin/ and there is pip, pip2, pip3
I’m guessing pip3 needs to be in the python3.7 folder. So I copy paste… and it tells me access denied.

In Windows, the python folder is called python37, inside of that folder is the python.exe file.
There are subfolders, one of them is named scripts, inside of there are three versions of pip: pip.exe, pip3.exe, pip3.7.exe

In linux, there is no file called python in the python3.7 folder, there is no sub folder called scripts, there is no file called pip, and I can’t move any of the pips from /usr/bin/ to /usr/lib/bin/python3.7/
because access is denied.

So, how do I get python 3.7.2 to run pip to execute a command?
 
Old 02-16-2019, 06:24 PM   #2
Corvette
Member
 
Registered: Jul 2017
Location: Missouri, United States
Distribution: Debian 9
Posts: 110

Rep: Reputation: 24
Try the following:

Code:
sudo apt install python3-pip
 
Old 02-16-2019, 06:48 PM   #3
CatDog
LQ Newbie
 
Registered: Oct 2018
Posts: 15

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Corvette View Post
Try the following:

Code:
sudo apt install python3-pip
After running the command you gave me, I try installing this program and it still says it can't find pip.
The exact error was:
python3.7: can't open file 'pip': [Errno 2] No such file or directory
 
Old 02-16-2019, 06:58 PM   #4
Corvette
Member
 
Registered: Jul 2017
Location: Missouri, United States
Distribution: Debian 9
Posts: 110

Rep: Reputation: 24
Are you just trying to run pip from the command line? If not, what program are you trying to run? If the latter, please confirm whether or not pip is at least recognized at the command line.
 
Old 02-16-2019, 09:59 PM   #5
CatDog
LQ Newbie
 
Registered: Oct 2018
Posts: 15

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Corvette View Post
Are you just trying to run pip from the command line? If not, what program are you trying to run? If the latter, please confirm whether or not pip is at least recognized at the command line.
OK what I’m trying to do is install a program from the command line.
The program is a script that extracts chat data from Twitch.tv streams (no it is not a hacking tool, and requires registration with twitch dev portal to have server permissions in order to function).
I know the program works on Win7.

The command I am doing is “python pip -m install -r requirements.txt”

To check that pip is installed, I just went to terminal and typed “pip”
It gave back a list of commands.

I typed “pip check”
It told me “no broken dependencies”

I type “pip –version”, It says:
pip 9.0.1 from /usr/lib/python2.7/dist-packages (python 2.7)

I type “pip3 –version”, It says:
pip 9.0.1 from /usr/lib/python3/dist-packages (python 3.6)

I need pip to run from python 3.7.2
I type in “whereis python” and here is a list of all python versions and directories:

python: /usr/bin/python /usr/bin/python2.7 /usr/bin/python3.6 /usr/bin/python3.6m /usr/bin/python2.7-config /usr/bin/python3.6m-config /usr/bin/python3.6-config /usr/lib/python2.7 /usr/lib/python3.6 /usr/lib/python3.7 /etc/python /etc/python2.7 /etc/python3.6 /usr/local/bin/python3.7m-config /usr/local/bin/python3.7m /usr/local/bin/python3.7 /usr/local/lib/python2.7 /usr/local/lib/python3.6 /usr/local/lib/python3.7 /usr/include/python3.6m /usr/include/python2.7 /usr/include/python3.6 /usr/share/python /usr/share/man/man1/python.1.gz /usr/src/Python-3.7.2/python

Turns out I was mistaken earlier on where 3.7.2 was located, anyhow, I go to that directory, and pip.py is in there at:
/usr/src/Python-3.7.2/PC/layout/support/pip.py

I don't know if that's the right version or right place for it to be.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: How To Install and Manage Python Packages on Linux With PIP LXer Syndicated Linux News 0 01-23-2019 03:32 PM
LXer: pip Uninstall | Uninstall a Package Installed with pip LXer Syndicated Linux News 0 03-01-2018 10:30 AM
how do I install pip/setuptools and other Python packages without sudo/su privileges? OMouse Linux - Software 2 08-30-2013 11:40 AM
Hello, Bon Jour, Pip Pip SocaSpice LinuxQuestions.org Member Intro 3 11-14-2010 08:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration