2

I have installed python 3.7 alongside python 3.9 to use for tensor flow and set 3.7 as my main python version via .bashrc and the alternatives tool.

I cant seem to install tensor flow(or any python module in fact) for python3.7 no matter what command I try, for example:

python3 -m pip install tensorflow
python3.7 -m pip install tensorflow
pip3 install tensorflow
pip install tensorflow
pip3.7 install tensorflow

None of these commands work and return the error no module named pip, I look inside ~/.local/bin and there is: pip, pip3 and pip3.9 but no pip3.7 and then in ~/.local/lib there is only a directory for python3.9

Also the current version (for both python -V and python3 -V) is 3.7.10

I'm using fedora 33 and have tried to look for packages such as python3.7-pip or pip3.7 but no luck there.

phd
  • 82,685
  • 13
  • 120
  • 165
KJ465
  • 33
  • 5
  • Can you check whats the output of ```python -m pip --version``` ? The documentation here https://pip.pypa.io/en/stable/installing/ says pip should come by default – kjsr7 Mar 15 '21 at 11:05
  • the output is "usr/bin/python: No module named pip" and the same command but with python3 the output is "usr/bin/python3.7: No module named pip" – KJ465 Mar 15 '21 at 11:06
  • Try installing pip using ```sudo yum install python3-pip``` – kjsr7 Mar 15 '21 at 11:09
  • the output is that "python-pip-20.2.2.1.fc33.noarch is already installed" – KJ465 Mar 15 '21 at 11:10
  • Ok. Try ```python-pip-20.2.2.1.fc33.noarch install tensorflow``` – kjsr7 Mar 15 '21 at 11:10
  • states that the command is not found, I also tried to remove pip and python3.9 to try to install pip for python3.7 but it states that it would also remove protected packages: gnome-shell which is strange – KJ465 Mar 15 '21 at 11:12
  • https://stackoverflow.com/search?q=%5Bpip%5D+%22no+module+named+pip%22 – phd Mar 15 '21 at 14:45
  • `python3.7 -m ensurepip` – phd Mar 15 '21 at 14:45
  • Or `wget https://bootstrap.pypa.io/get-pip.py && python3.7 get-pip.py` – phd Mar 15 '21 at 14:47

0 Answers0