【发布时间】:2014-02-07 17:10:45
【问题描述】:
所以我从 source easy install-3.3 获得了 python3.3.2,我正试图让它们正常工作,但我在其中一台服务器上遇到了问题。在 Ubuntu 中,我只是这样做:
# Install python 3.3.2
cd /tmp/
wget http://www.python.org/ftp/python/3.3.2/Python-3.3.2.tar.bz2
tar xvf Python-3.3.2.tar.bz2
cd Python-3.3.2/
./configure --prefix=/usr/
make
make test
sudo make install
要让 python 工作......这很好,那么:
# Install easy_install for python 3.3.2
cd /tmp/
wget https://pypi.python.org/packages/source/d/distribute/distribute-0.6.49.tar.gz
tar xzvf distribute-0.6.49.tar.gz
cd distribute-0.6.49
sudo python3 setup.py build
sudo python3 setup.py install
然后我可以在输出中看到一些奇怪的东西:
...
Extracting distribute-0.6.49-py3.3.egg to /usr/bin/lib/python3.3/site-packages
distribute 0.6.49 is already the active version in easy-install.pth
Installing easy_install script to /usr/bin/bin
Installing easy_install-3.3 script to /usr/bin/bin
...
为什么easy_install 被放置在/usr/bin/bin???? WTH??
另外,我用 easy_install 安装的所有东西都放在那里:
sudo easy_install-3.3 gunicorn
Searching for gunicorn
Best match: gunicorn 18.0
Processing gunicorn-18.0-py3.3.egg
gunicorn 18.0 is already the active version in easy-install.pth
Installing gunicorn_django script to /usr/bin/bin
Installing gunicorn script to /usr/bin/bin
Installing gunicorn_paster script to /usr/bin/bin
Using /usr/bin/lib/python3.3/site-packages/gunicorn-18.0-py3.3.egg
Processing dependencies for gunicorn
Finished processing dependencies for gunicorn
虽然:
which python3 和 which easy_install-3.3 都按预期指向 /usr/bin!
当然所有的二进制文件都在那里,但在 PATH 上无法访问它们......而且我不想编辑我的 PATH 环境变量......关于发生了什么的任何想法??
【问题讨论】:
-
请问
which python3好吗? -
我在 /usr/bin/python3 符合预期
标签: python python-3.x setuptools easy-install