
O Ubuntu 11.10 separou o python-profiler da biblioteca padrão do Python devido às filosofias de licenciamento. (De acordo com o que pude pesquisar no Google, corrija-me se estiver errado.)
Este é um bug ativo desde outubro para 11.10. Tenho o Python 2.7.2 instalado, então os erros de dependência estão errados. 'apt-get check' não resolve o problema.
Qual é a melhor maneira de resolver isso? Obrigado.
sudo apt-get install python-profiler
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
python-profiler : Depends: python (>= 2.5) but it is not going to be installed
Depends: python (< 2.8) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Responder1
O python-profile
pacote inclui apenas alguns .py
arquivos:
$ apt-file list python-profiler
python-profiler: /usr/lib/python2.5/profile.py
python-profiler: /usr/lib/python2.5/pstats.py
python-profiler: /usr/lib/python2.6/profile.py
python-profiler: /usr/lib/python2.6/pstats.py
python-profiler: /usr/lib/python2.7/profile.py
python-profiler: /usr/lib/python2.7/pstats.py
python-profiler: /usr/share/doc/python-profiler/README.Debian
python-profiler: /usr/share/doc/python-profiler/changelog.Debian.gz
python-profiler: /usr/share/doc/python-profiler/copyright
python-profiler: /usr/share/lintian/overrides/python-profiler
Portanto, você pode baixar o pacote binário usando apt-get download python-profiler
e extrair seu conteúdo com dpkg -x python-profiler_<version>_all.deb <dir>
. Depois de obter o conteúdo do pacote, basta copiar os .py
arquivos para seus locais para disponibilizar os módulos do criador de perfil na instalação do python.