0

I formatted my PC in order to find site-packages but I can not see them using those lines necessary.

import sys
print ('\n'.join(sys.path))

I don't find the paths (I'd like to see those paths) :

'/usr/local/lib/python2.7/site-packages'

and

'/usr/local/lib/python3.5/site-packages'

the output is:

redhwan@redhwan:~$ python
Python 2.7.12 (default, Nov 12 2018, 14:36:49) 
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> print ('\n'.join(sys.path))

/usr/lib/python2.7
/usr/lib/python2.7/plat-x86_64-linux-gnu
/usr/lib/python2.7/lib-tk
/usr/lib/python2.7/lib-old
/usr/lib/python2.7/lib-dynload
/usr/local/lib/python2.7/dist-packages
/usr/lib/python2.7/dist-packages
Redhwan
  • 927
  • 1
  • 9
  • 24
  • 1
    What does formatting have with anything to do? On a freshly installed system you simply don't yet have any site packages. – tripleee Jul 04 '20 at 08:50
  • 1
    Also, please don't post screen shots of text. – tripleee Jul 04 '20 at 08:52
  • @tripleee, thanks for your comments. How to install it, please? – Redhwan Jul 04 '20 at 09:28
  • Install what? You already have Python installed; if you. Ant to install optional third-party packages like `numpy` or `requests` then `pip install numpy requests` will do that, and update your Python configuration. (On some platforms you need `pip3` to install Python 3 packages.) – tripleee Jul 04 '20 at 11:35
  • If you are only just learning the basics, you should probably ignore Python 2, and spend your time on the currently recommended and supported version of the language, which is Python 3. – tripleee Jul 04 '20 at 11:35
  • Python 2.7 has been sunsetted. https://www.python.org/doc/sunset-python-2/, I know that but I still use python2 because of ROS kinetic for robot, it does not work well with python 3. I am not the basics although my issue is basic for you, I am building the robot system to work well and it is more important this issue. – Redhwan Jul 04 '20 at 11:46

1 Answers1

0

I got here, it is a very good blog.

Someone commented

export PYTHONPATH="/usr/lib/python2.7/site-packages:/usr/local/lib/python2.7/site-packages:/usr/local/lib/python2.7/dist-packages"

But I don't know if there are another issue by this action.

Redhwan
  • 927
  • 1
  • 9
  • 24