0

What does it mean I install some python package by pip in Linux Mint, installed here: /home/user/.local/lib/python3.6/site-packages

user@user-H370M-DS3H:~/.local/lib/python3.6/site-packages$ pip3 show selenium
Name: selenium
Version: 3.141.0
Summary: Python bindings for Selenium
Home-page: https://github.com/SeleniumHQ/selenium/
Author: UNKNOWN
Author-email: UNKNOWN
License: Apache 2.0
**Location: /home/user/.local/lib/python3.6/site-packages**

But in Intellij Idea project interpretter cannot recognize this package: In Project Structure I see only path: /usr/lib/python3.8/site-packages with some others packages:

And the path /.local/lib/python3.6/site-packages Intellij Idea does't find. So all the python packages I install throw PIP in Linux console cannot recognize in Intellij Idea. How can I install python packages by Linux console without using Virtual Env for all projects?

Alexander
  • 1
  • 1
  • 3

1 Answers1

0

If you set your pythonpath to point to the python IntelliJ knows about (pythonpath explained here) then pip will install the selenium package to the right location.

At that point you are doing about half the work of a virtual environment though, so you should reconsider why you don't want to use virtual environments for every project.

  • I set PYTHONPATH=/usr/lib/python3.8/site-packages Then make pip install selenium Then pip show selenium .... Location: /usr/local/lib/python3.6/dist-packages Intellij Idea cannot recognize it again.. – Alexander Feb 28 '21 at 20:16