但是有的三方库只能用apt-get install 来安装
相关经验:
2020年8月9日
https://stackoverflow.com/questions/15661384/python-does-not-see-pygraphviz
这个是关于import gv出错的问题
开始发现 pip install pygraphviz 无法安装,sudo pip 也不行
后来这个帖子里面指出,执行以下就行,理由是这是pygraphviz自身的问题,呵呵
sudo apt-get install -y graphviz libgraphviz-dev pkg-config python-pip
sudo pip install pygraphviz
2020年8月9日
另外, https://askubuntu.com/questions/581648/install-package-into-virtualenv-using-apt-get
这个帖子里面说:
Another alternative is to download the file with apt-get download, extract it with dpkg -x and to move the extracted files to your virtualenv:
Example:
apt-get download python-xyz
assume this results in:
./python-xyz_1.2.3-3ubuntu5_amd64.deb
Then, use dpkg to extract the data portion of the .deb file:
dpkg -x python-xyz_1.2.3-3ubuntu5_amd64.deb ./xyz-tmp
In the newly created ./xyz-tmp directory, you now have all files that would have been installed to / (root) had you used apt-get install.
Assume they are:
./xyz-tmp/usr/lib/python2.7/dist-packages/xyz/
./xyz-tmp/usr/lib/python2.7/dist-packages/xyz-1.2.3.egg-info
You still need to map the subdirectories (e.g. dist-packages vs. site-packages), and can then move the files into your virtualenv (assuming a virtualenv /home/user/.virtualenvs/py27):
mv ./xyz-tmp/usr/lib/python2.7/dist-packages/* /home/user/.virtualenvs/py27/lib/python2.7/site-packages/
Compared to my previous answer, this approach has the advantage that you don't have to research which files got installed, because you can see them in the extraction directory. It still requires a mapping of directories between the extracted archive and the virtualenv.
进入Cydia后有下面有5个选项,选从右数第2个,然后选中间那个,接着点右上角的按键,然后再点左上角的(估计翻译成“添加”),这时在d出的对话框里输入你要加的源就行了。由于你的是中文版,所以我只说按钮的位置,就不说名字了,免得翻译不一样你找不到,建议还是用英文版,就那几个单词,查查词典就会了。其实源就类似于网址,你把这个源填进去了就能下这个网站的软件了,基本就是这样。那两个软件这个源上都有http://cydia.myrepospace.com/suik/
下不到多试几次,Cydia是国外的软件,服务器也在国外,所以链接会慢点差点,实在不行去其他源里找找,总之Cydia几乎是无所不能。
祝你使用愉快!
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)