简体   繁体   English

Debian Jessie前沿安装,同时保留系统软件包

[英]Debian Jessie bleeding edge install whilst retaining system packages

I'm using spaCy which requires a much newer version of python-numpy than the system version provided by Debian Jessie. 我正在使用spaCy,它需要比Debian Jessie提供的系统版本新的python-numpy版本。 So I remove numpy using apt-get and install new versions using pip and pip3. 因此,我使用apt-get删除了numpy并使用pip和pip3安装了新版本。 But removing the system numpy removes my terminator (nice terminal app for Debian). 但是删除系统numpy会删除我的终结器(Debian的漂亮终端应用程序)。 I use this application all the time so I don't want it to disappear? 我一直在使用这个应用程序,所以我不想它消失吗? Is there a way to retain the system version of numpy and also use a new version of numpy with spaCy? 有没有办法保留numpy的系统版本,并在spaCy中使用新版本的numpy? I don't want to use virtual machines. 我不想使用虚拟机。 Is there a way to use virtualenv or some other tool to do this? 有没有办法使用virtualenv或其他工具来做到这一点?

I've found a nice way of doing what the FHS should be doing by default. 我发现默认情况下FHS应该执行的一种好方法。 I can download the very latest pip3 version and install all recent packages in a way that will keep them separated from the rest of the OS (as /usr/local should be doing, but doesn't do!!!). 我可以下载最新的pip3版本并安装所有最新的软件包,以使其与操作系统的其余部分分开(如/ usr / local应该这样做,但不能这样做!)。 I've included the spaCy installation as an example: 我以spaCy安装为例:

virtualenv -p python3 ~/bleeding-edge-virtualenv
source ~/bleeding-edge-virtualenv/bin/activate
mkdir -p python/workspaces && cd python/workspaces
wget https://bootstrap.pypa.io/get-pip.py -O ./get-pip.py
python3 ./get-pip.py
python3 --version
pip 9.0.1 from /home/ekenny/bleeding-edge-virtualenv/lib/python3.4/site-packages (python 3.4)
git clone https://github.com/explosion/spaCy
cd spaCy
pip3 download -m requirements.txt 
pip3 install -r requirements.txt 
python3 setup.py install
deactivate

Then I can remove all the crud under /usr/local and never have to worry about duplicate stuff. 然后,我可以删除/ usr / local下的所有杂项,而不必担心重复的内容。 Full bleeding edge environment loadable at any time using activate . 可以使用激活随时加载完整的边缘环境。 Happy days. 快乐的时光。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM