[英]Python3: Module not found
我已經安裝了numpy,但Shell表示未安裝。 我安裝了多個python3版本。 我知道它必須做點什么才能指向正確的路徑,但是我不知道該怎么做。 python3和pip3都指向python 3.6。 我不明白這可能是什么問題?
這些可能會有所幫助:
$ where python3
/home/subtleseeker/miniconda3/bin/python3
/usr/bin/python3
/usr/bin/python3
$ whereis python3
python3: /usr/bin/python3.6m
/usr/bin/python3.6-config
/usr/bin/python3
/usr/bin/python3.6m-config
/usr/bin/python3.6
/usr/lib/x86_64-linux-gnu/python3.6
/usr/lib/python3.7
/usr/lib/python3
/usr/lib/python3.6
/etc/python3
/etc/python3.6
/usr/local/bin/python3.4m-config
/usr/local/bin/python3.4
/usr/local/bin/python3.4m
/usr/local/lib/python3.4
/usr/local/lib/python3.6
/usr/include/python3.6m
/usr/include/python3.6
/usr/share/python3
/home/subtleseeker/miniconda3/bin/python3.6m
/home/subtleseeker/miniconda3/bin/python3.6-config
/home/subtleseeker/miniconda3/bin/python3
/home/subtleseeker/miniconda3/bin/python3.6m-
/home/subtleseeker/miniconda3/bin/
/usr/share/man/man1/python3.1.gz
$ pip3 --version
pip 18.0 from /usr/local/lib/python3.6/dist-packages/pip (python 3.6)
$ python3 --version
Python 3.6.5 :: Anaconda, Inc.
>>> import sys
>>> print(sys.path)
['', '/home/subtleseeker/miniconda3/lib/python36.zip', '/home/subtleseeker/miniconda3/lib/python3.6', '/home/subtleseeker/miniconda3/lib/python3.6/lib-dynload', '/home/subtleseeker/.local/lib/python3.6/site-packages', '/home/subtleseeker/miniconda3/lib/python3.6/site-packages']
當我安裝miniconda時,問題開始了。 順便說一句,我已經安裝了蟒蛇。
您已經確定要使用的python版本確實安裝了numpy嗎? 你可以用
$ [path_to_your_used_python_version] -m pip show numpy
如果尚未安裝,則可以使用
$ [path_to_your_used_python_version] -m pip install numpy
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.