久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

Conda安裝的包,Python找不到

Package installed by Conda, Python cannot find it(Conda安裝的包,Python找不到)
本文介紹了Conda安裝的包,Python找不到的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我嘗試安裝 Anaconda 的 Theano.它可以工作,但是當我輸入 python -i 時,import theano 顯示 No module named 'theano'.我是否需要切換另一個 Python 解釋器,如何?另外,對于 conda 安裝的包,如果我不重復安裝它們,我可以在 Python 中找到嗎?Python 與 Anaconda 的 Python 有什么關系?謝謝!!!

I try to install Theano by Anaconda. It works, but when I enter the python -i, import theano shows No module named 'theano'. Do I need to switch another interpreter of Python, how? Also, for the packages installed by conda, if I don't double install them, can I find in Python? How is Python related to Python by Anaconda? Thanks!!!

推薦答案

我遇到了類似的問題,嘗試安裝 folium.如果您使用的是Anaconda:

I had have a similar issue, trying to install folium. If you are using the Anaconda:

當你使用conda install -c conda-forge folium安裝時,包會放在:

When you install using conda install -c conda-forge folium, the package will be placed in:

./anaconda3/envs/[name env]/lib/python3.7/site-packages/folium

當您使用 pip 安裝時(激活 anaconda env),pip install folium,包將被放置在:

When you install using pip (with a anaconda env activated), pip install folium, the package will be placed in:

./anaconda3/lib/python3.7/site-packages/folium

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

Python use first the sites-packages as the target directory of manually built python packages. When you build and install python packages from source (using distutils, probably by executing python setup.py install ), you will find the installed modules in site-packages by default.

在這種情況下,您有兩個位置:/anaconda3/lib/python3.7/site-packages//anaconda3/envs/[name env]/lib/python3.7/site-packages/.

In this case you have two places: /anaconda3/lib/python3.7/site-packages/ and /anaconda3/envs/[name env]/lib/python3.7/site-packages/.

首先,這些模塊將在 /anaconda3/lib/python3.7/site-packages/ 中默認可用.有時(我真的不知道為什么)sites-packages conda env 中的模塊在不導出 PATH 的情況下無法自動導入.

First the modules will be available as default in /anaconda3/lib/python3.7/site-packages/. Sometimes (and I really don't know why) the modules inside sites-packages conda env are not available to import automatically without export the PATH.

所以,要解決這個問題,你有兩個選擇:

So, to solve this issue, you have 2 options:

  • 使用 pip install folium 安裝并導入 folium(不需要通過 conda install 安裝),或

  • Installing using pip install folium and import folium (don't need install by conda install), or

在 conda install 之后,運行 conda init,關閉終端并打開一個新終端.所以,嘗試再次導入.

After conda install , run conda init, close the terminal and open a new one. So, try to import again.

這里是一些關于使用 pip inconda 環境.

Here are some tips about use a pip in a conda-environment.

這篇關于Conda安裝的包,Python找不到的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

How to install Selenium in a conda environment?(如何在 conda 環境中安裝 Selenium?)
get the CUDA and CUDNN version on windows with Anaconda installe(使用 Anaconda installe 在 Windows 上獲取 CUDA 和 CUDNN 版本)
How can I download Anaconda for python 3.6(如何下載適用于 python 3.6 的 Anaconda)
Using two different Python Distributions(使用兩個不同的 Python 發行版)
How can I install Anaconda aside an existing pyenv installation on OSX?(除了 OSX 上現有的 pyenv 安裝之外,如何安裝 Anaconda?)
Permanently set Python path for Anaconda within Cygwin(在 Cygwin 中為 Anaconda 永久設置 Python 路徑)
主站蜘蛛池模板: 99久久婷婷国产综合精品电影 | 国产福利在线 | 久久精品久久久 | 亚洲国产一区二区三区在线观看 | 97视频在线免费 | 日韩在线视频免费观看 | 国产99久久精品一区二区300 | 久久久精品国产 | 中文字幕91av | 一级高清视频 | 一区二区三区在线播放视频 | 国产在线精品一区 | 一级一级一级毛片 | 亚洲一区二区在线免费观看 | 日韩一区二区三区四区五区 | 日本久久久久久久久 | 久久天天躁狠狠躁夜夜躁2014 | 日本午夜精品 | 亚州综合在线 | 免费国产一区二区 | 91免费在线看| 亚洲国产精品激情在线观看 | 欧美极品在线播放 | 亚洲三区在线观看 | 国产乱码精品一区二区三区五月婷 | 欧美在线天堂 | 羞羞羞视频| 久久99精品久久久久 | 中文字幕在线看人 | 91国内精精品久久久久久婷婷 | 亚洲综合大片69999 | 免费在线观看av | 国产视频福利一区 | 一级片视频免费观看 | 日韩欧美在线视频一区 | 亚洲成人av | 青青草原综合久久大伊人精品 | 国产午夜av片 | 免费在线看黄 | 国产精品免费看 | 在线免费观看欧美 |