Entering edit mode
3.5 years ago
Fede_Santos95
▴
20
Hi guys,
I've to install argparse package for phyton version 2.7.
I tried with the following command:
python2 -m pip install argparse
and the shell returned me
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: argparse in /usr/lib/python2.7 (1.2.1)
When I ran the following command:
pip list
argparse didn't figure among the installed packages of python, since I found:
Package Version
--------------- -------
bitarray 2.1.0
joblib 0.14.1
numpy 1.16.6
pandas 0.24.2
pip 20.3.4
python-dateutil 2.8.1
pytz 2021.1
scipy 1.2.3
setuptools 44.1.1
six 1.16.0
wheel 0.36.2
How can I install this package?
my python version is:
Python 2.7.18 (default, Mar 8 2021, 13:02:45)
[GCC 9.3.0] on linux2
my pip version is:
pip 20.3.4 from /usr/local/lib/python2.7/dist-packages/pip (python 2.7)
my server system is:
Linux platonesrv1 5.4.0-73-generic #82-Ubuntu SMP Wed Apr 14 17:39:42 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Thank u!
Have you tried removing and re-installing
argparse
?When I run the following command to uninstall argparse:
I found:
I guess you should be able to import it directly, without explicit installation.
Try running:
import argparse
on python interpreter and see what happens. Usually, it should be ok.argparse is in the standard python library - you probably should not install it. Do you have a problem when you just try to import it?
I've tried to import it in the interactive shell of python and it seems that it works. Thank u so much to all of you!