首页 > 解决方案 > pybrain install in env but No module named 'pybrain'

问题描述

I'm new to python and Anaconda

I have python 3.8 in my (base) env, and i need pybrain, so since it's not compatible with my current version of python, i created a new env(first i tried all of it with python 3.5, didn't work, so i tried 2.7, same result):

conda create --name py27 python=2.7

then activated it:

conda activate py27

and installed pybrain there:

conda install -c mq pybrain

I checked that it has been installed successfully with:

conda list

pybrain 0.3.3 py27_0 mq

after launching jupyter notebook from same terminal, with (py27) as the 'header'?? of my command line, it opened successfully, i even checked that currently it's opened in expected environment, by typing in a cell:

!conda info

and as i expected, saw the line

active environment : py27

but also, which i guess is importnant:

python version : 3.8.3.final.0

though i am confused with ouput of:

!python --version

cause it's:

Python 2.7.18 :: Anaconda, Inc.

So when i open my notebook i type

import pybrain

and i get:

No module named 'pybrain'

Please point me in direction: what i'm doing wrong? Also it is my first virtual env(distinct from the (base) one), so i probably missing some important concepts.

标签: pythonanacondavirtualenvcondapybrain

解决方案


幸运的是,我找到了将 pybrain 与 python3 一起使用的解决方案——我刚刚从源代码下载了它!pip install https://github.com/pybrain/pybrain/archive/0.3.3.zip,它可以在 python 3.8 中使用


推荐阅读