我试图在我用mkvirtualenv创建的python虚拟环境中使用Mayavi.Mayavi包安装在.NET环境中。
/usr/local/lib/python3.7/site-packages/mayavi-4.7.2.dev0-py3.7-macosx-10.15-
x86_64.egg/
为了将Mayavi的安装关联到我的virtualenv,我执行了这个代码。
cd ~/.virtualenvs/project/lib/python3.7/sites-packages/
ln -s /usr/local/lib/python3.7/site-packages/mayavi-4.7.2.dev0-py3.7-macosx
-10.15-x86_64.egg/ mayavi
workon my_project
python3
>> import mayavi.mlab as mlab
---> ModuleNotFoundError : No module named 'mayavi.mlab'
模拟链接似乎被创建了,我不明白为什么我有这个问题。你能帮助我吗?
根据phd的评论,我在我指定的环境中使用与我的环境相关联的python版本安装了Mayavi模块,如下所示。
$workon name_of_my_environment
$cd path_to_mayavi_directory
$python setup.py install #be careful. python is associated to the
#python version installed in the
#environment (check this with : which
#python)