簡體   English   中英

在 Linux Mint 中為 Intellij Idea 設置 python 路徑變量

[英]Set python path variable in Linux Mint for Intellij Idea

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**

但是在 Intellij Idea 項目解釋器中無法識別這個 package:在項目結構中我只看到路徑: /usr/lib/python3.8/site-packages和其他一些包:

並且路徑/.local/lib/python3.6/site-packages Intellij Idea 沒有找到。 因此,我在 Linux 控制台中安裝的所有 python 軟件包都無法在 Intellij Idea 中識別。 如何在不為所有項目使用虛擬環境的情況下通過 Linux 控制台安裝 python 包?

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.

到那時,您正在做大約一半的虛擬環境工作,因此您應該重新考慮為什么您不想為每個項目都使用虛擬環境。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM