Hi,
i tried to upgrade from 2.0rc1 to 2.0rc2
systemctl stop indico-celery.service
su - indico
source ~/.venv/bin/activate
pip install -U --pre indico
I got this error message
Traceback (most recent call last):
File "/opt/indico/.venv/bin/pip", line 7, in <module>
from pip import main
File "/opt/indico/.venv/local/lib/python2.7/site-packages/pip/__init__.py", line 76, in <module>
from pip.commands import commands, get_summaries, get_similar_commands
File "/opt/indico/.venv/local/lib/python2.7/site-packages/pip/commands/__init__.py", line 6, in <module>
from pip.commands.bundle import BundleCommand
File "/opt/indico/.venv/local/lib/python2.7/site-packages/pip/commands/bundle.py", line 6, in <module>
from pip.commands.install import InstallCommand
File "/opt/indico/.venv/local/lib/python2.7/site-packages/pip/commands/install.py", line 5, in <module>
from pip.req import InstallRequirement, RequirementSet, parse_requirements
File "/opt/indico/.venv/local/lib/python2.7/site-packages/pip/req/__init__.py", line 3, in <module>
from .req_install import InstallRequirement
File "/opt/indico/.venv/local/lib/python2.7/site-packages/pip/req/req_install.py", line 42, in <module>
from pip.utils.hashes import Hashes
File "/opt/indico/.venv/local/lib/python2.7/site-packages/pip/utils/hashes.py", line 5, in <module>
from pip.exceptions import HashMismatch, HashMissing, InstallationError
ImportError: cannot import name HashMissing
Regards
Gautier
This sounds like some (strange) problem with your virtualenv.
Is pip
itself working (see if other commands like pip freeze
work or fail as well)? If it does work, try try upgrading pip and setuptools first using pip install -U setuptools pip
Yes, you’re right, pip is not working.
I did
su - indico
pip install -U setuptools pip
-su: pip : commande introuvable
I does not work neiher…
I also did
indico:~$ virtualenv ~/.venv
Running virtualenv with interpreter /usr/bin/python2
New python executable in /opt/indico/.venv/bin/python2
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/virtualenv.py", line 2378, in <module>
main()
File "/usr/lib/python3/dist-packages/virtualenv.py", line 830, in main
symlink=options.symlink)
File "/usr/lib/python3/dist-packages/virtualenv.py", line 999, in create_environment
site_packages=site_packages, clear=clear, symlink=symlink))
File "/usr/lib/python3/dist-packages/virtualenv.py", line 1316, in install_python
shutil.copyfile(executable, py_executable)
File "/usr/lib/python2.7/shutil.py", line 83, in copyfile
with open(dst, 'wb') as fdst:
IOError: [Errno 26] Text file busy: '/opt/indico/.venv/bin/python2'
su - indico
virtualenv ~/.venv
Running virtualenv with interpreter /usr/bin/python2
New python executable in /opt/indico/.venv/bin/python2
Not overwriting existing python script /opt/indico/.venv/bin/python (you must use /opt/indico/.venv/bin/python2)
Installing setuptools, pip...done.
Is there something wrong here ? Root and indico user confused on pip ?
Is this right to have python and python2 here ?
0 lrwxrwxrwx 1 indico www-data 7 déc. 23 19:22 python -> python2
3,7M -rwxr-xr-x 1 indico www-data 3,7M déc. 23 19:22 python2
0 lrwxrwxrwx 1 indico www-data 7 déc. 23 19:22 python2.7 -> python2
Yes, these symlinks are normal. The easiest option to hopefully fix whatever is wrong with your virtualenv is to recreate it, by running these commands as the indico user:
deactivate # just in case your old virtualenv is still active
rm -rf ~/.venv
virtualenv ~/.venv
source ~/.venv/bin/activate
pip install -U pip setuptools
pip install --pre indico
Thank you so much, it worked !
I’m totally new to pyhton virtualenv, i was lost.
Indico is upgraded now
Regards