distutils忽略了选定的python环境

时间:2017-10-27 09:26:49

标签: python anaconda distutils python-venv

(py35) dims@calculon:~/Design/RAD/poseutils-python$ which python
/opt/anaconda3/envs/py35/bin/python

(py35) dims@calculon:~/Design/RAD/poseutils-python$ python --version
Python 3.5.4 :: Anaconda, Inc.

(py35) dims@calculon:~/Design/RAD/poseutils-python$ sudo python setup.py install
running install
running build
running build_py
creating build/lib.linux-x86_64-2.7/poseutils/tests
...
creating /usr/local/lib/python2.7/dist-packages/poseutils
copying build/lib.linux-x86_64-2.7/poseutils/vizualisation.py -> /usr/local/lib/python2.7/dist-packages/poseutils
copying build/lib.linux-x86_64-2.7/poseutils/linalg.py -> /usr/local/lib/python2.7/dist-packages/poseutils
copying build/lib.linux-x86_64-2.7/poseutils/util.py -> /usr/local/lib/python2.7/dist-packages/poseutils
...
byte-compiling /usr/local/lib/python2.7/dist-packages/poseutils/vizualisation.py to vizualisation.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/poseutils/linalg.py to linalg.pyc
...
running install_egg_info
Writing /usr/local/lib/python2.7/dist-packages/Poseutils-1.0dev.egg-info

如您所见,选择环境py35(由命令行提示符和其他命令指示),安装程序仍在将文件复制到python2.7位置。

为什么呢?以及如何解决?

更新

我也可以导入包:

(py35) dims@calculon:~/Design/RAD$ python
Python 3.5.4 |Anaconda, Inc.| (default, Oct 13 2017, 11:22:58)
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import poseutils
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named 'poseutils'

0 个答案:

没有答案