Re: vstart.sh complains module prettytable not found even when present on the system

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Apr 20, 2020 at 6:43 PM Rishabh Dave <ridave@xxxxxxxxxx> wrote:
>
> On Mon, 20 Apr 2020 at 21:30, Rishabh Dave <ridave@xxxxxxxxxx> wrote:
> >
> > > > Traceback (most recent call last):
> > > >   File "/home/rishabh/repos/ceph/fs-shell-colors/build/bin/ceph", line
> > > > 151, in <module>
> > > >     from ceph_daemon import admin_socket, DaemonWatcher, Termsize
> > > >   File "/home/rishabh/repos/ceph/fs-shell-colors/src/pybind/ceph_daemon.py",
> > > > line 27, in <module>
> > > >     from prettytable import PrettyTable, HEADER
> > > > ModuleNotFoundError: No module named 'prettytable'
> > > >
> > > > Although this time my branch isn't up to date. It's at
> > > > https://github.com/ceph/ceph/commit/a6e72c98ef3ef39f0236d6faf083256c88973bfc.
> > > > And, yes, this time (too) I had the teuthology virtual environment
> > > > activated. I think this has definitely something to do with the error
> > >
> > > OK, so if you activate this same virtual environment and run the
> > > following do you see the error?
> >
> > Nothing, the command completes successfully for me -
> >
> > $ python -c "from prettytable import PrettyTable, HEADER" && echo SUCCESS
> > SUCCESS
>
> Apologies, I made a mistake last time. Here's the output -
>
> (venv-teuth) [rishabh@f31 ~]$ python -c "from prettytable import
> PrettyTable, HEADER"
> Traceback (most recent call last):
>   File "<string>", line 1, in <module>
> ModuleNotFoundError: No module named 'prettytable'
> (venv-teuth) [rishabh@f31 ~]$ pip2 list | grep prettytable
> DEPRECATION: Python 2.7 reached the end of its life on January 1st,
> 2020. Please upgrade your Python as Python 2.7 is no longer
> maintained. A future version of pip will drop support for Python 2.7.
> More details about Python 2 support in pip, can be found at
> https://pip.pypa.io/en/latest/development/release-process/#python-2-support
> prettytable                  0.7.2
> (venv-teuth) [rishabh@f31 ~]$ pip3 list | grep prettytable
> WARNING: pip is being invoked by an old script wrapper. This will fail
> in a future version of pip.
> Please see https://github.com/pypa/pip/issues/5599 for advice on
> fixing the underlying issue.
> To avoid this problem you can invoke Python with '-m pip' instead of
> running pip directly.

This warning seems really weird. What does 'which pip3' say? How is it
defined? Does the github issue give you any pointers?

Anyway, given how the python -c "..." command failed before, this
suggests the prettytable module is not installed for python3. I
suspect that the pip3 wrapper just masks this by showing python2
modules.

-boris

> prettytable                   0.7.2
> (venv-teuth) [rishabh@f31 ~]$ python2 -c "from prettytable import
> PrettyTable, HEADER"
> (venv-teuth) [rishabh@f31 ~]$
> (venv-teuth) [rishabh@f31 ~]$ python2 -c "from prettytable import
> PrettyTable, HEADER" && echo SUCCESS
> SUCCESS
>
_______________________________________________
Dev mailing list -- dev@xxxxxxx
To unsubscribe send an email to dev-leave@xxxxxxx



[Index of Archives]     [CEPH Users]     [Ceph Devel]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux