簡體   English   中英

無法使用下載的包

[英]Cannot use downloaded packages

我從我的 cmd 下載了 pip 和一系列其他包,但是當我想在 Eclipse 中使用它們時它們不會導入。

我已經檢查了它們是否在 pip 列表中。

您需要配置 Eclipse 以在 python 安裝中的 site-packages 文件夾中查找已安裝的軟件包。

site-packages 是手動構建的 Python 包的目標目錄。 當您從源代碼構建和安裝 Python 包時(使用 distutils,可能通過執行 python setup.py 安裝),默認情況下您會在 site-packages 中找到已安裝的模塊。

您可以按照以下步驟將其添加到 Eclipse 中:

1. Find out the path to the folder ../site-packages/ of your corresponding python version. ( e.g /usr/local/lib/python3.6/site-package for python3.6 on Ubuntu )
2. Open eclipse preferences and go to PyDev -> Interpreter - Python.
3. On the left side of the lower box, click on New Folder.
4. Add the navigate to ../site-packages/ of your corresponding python version.
5. Hit Open.
6. Hit Apply.
7. Hit Ok.

暫無
暫無

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

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