0

I had pyhton2.7 and Python3.5 in my laptop but to use f string, I installed pyhton3.6.5 and removed python3.5. Now I have python2.7 and Python3.6.5. But I am not able to install any libraries for the python3.6.5

I have tried this but it doesn't works

Please let me know how can I install modules for the python3.6.5

Giorgos Myrianthous
  • 36,235
  • 20
  • 134
  • 156
  • 2
    try `python3 -m pip install foo` – Equinox Mar 30 '19 at 18:30
  • Instead of your link, try this [Two versions of python on linux. how to make x.x the default](https://stackoverflow.com/a/19256389/7414759) – stovfl Mar 30 '19 at 18:41
  • A possible scenario is that you're installing libraries correctly. But, you're opening the wrong python environment ([_See this_](https://stackoverflow.com/questions/48045752/module-installs-but-cannot-be-imported/48045822#48045822)) – ndrwnaguib Mar 30 '19 at 18:45
  • i tried this but its gives an error python3 command not found. – Durgesh Nandini Mar 30 '19 at 18:54

2 Answers2

1

Try this

sudo python3.6 -m pip install [Package_to_install]

I hope it will work.

Gautam Shahi
  • 455
  • 4
  • 14
1

Check the installation in your system, if there are several python3 installs in your system it might be an issue.

Either uninstall the other version of python3 or create a virtual environment and then install the library.

Check the description at https://www.alexkras.com/how-to-use-virtualenv-in-python-to-install-packages-locally/