You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@libcloud.apache.org by Massimo Canonico <ma...@uniupo.it> on 2021/06/02 10:49:06 UTC

weird problem: 'libcloud' is not a package

Hi,

on my Fedora, I have successfully installed the libcloud library:

[mex@hope code]$ pip3 install --user apache-libcloud
Requirement already satisfied: apache-libcloud in 
/home/mex/.local/lib/python3.8/site-packages (3.3.1)
Requirement already satisfied: requests>=2.5.0 in 
/home/mex/.local/lib/python3.8/site-packages (from apache-libcloud) (2.21.0)
Requirement already satisfied: certifi>=2017.4.17 in 
/usr/local/lib/python3.8/site-packages (from 
requests>=2.5.0->apache-libcloud) (2020.12.5)
Requirement already satisfied: idna<2.9,>=2.5 in 
/usr/lib/python3.8/site-packages (from requests>=2.5.0->apache-libcloud) 
(2.8)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in 
/usr/lib/python3.8/site-packages (from requests>=2.5.0->apache-libcloud) 
(3.0.4)
Requirement already satisfied: urllib3<1.25,>=1.21.1 in 
/home/mex/.local/lib/python3.8/site-packages (from 
requests>=2.5.0->apache-libcloud) (1.24.3)

put if I run this script with just the import lines:

import sys
import os
import libcloud
from libcloud.compute.types import Provider
from libcloud.compute.providers import get_driver

I get this error:

Traceback (most recent call last):
   File "prova.py", line 3, in <module>
     import libcloud
   File "/home/mex/work/teaching/hpc/code/libcloud.py", line 1, in <module>
     from libcloud.compute.types import Provider
ModuleNotFoundError: No module named 'libcloud.compute'; 'libcloud' is 
not a package


I've already tried to uninstall and re-install the package as suggested 
in some website, with no luck.

Do you have any idea how to fix it?

Thanks,

Massimo



Re: weird problem: 'libcloud' is not a package

Posted by Tomaz Muraus <to...@tomaz.me>.
No problem.

I assume your script file name (libcloud.py) clashes with the package name.

Easiest solution is to rename the file to something else or use relative imports.

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐

On Wednesday, June 2nd, 2021 at 12:56 PM, Massimo Canonico <ma...@uniupo.it> wrote:

> Please ignore my previous email.
>
> It was my bad.
>
> Sorry.
>
> M
>
> On 6/2/21 12:49 PM, Massimo Canonico wrote:
>
> > Hi,
> >
> > on my Fedora, I have successfully installed the libcloud library:
> >
> > [mex@hope code]$ pip3 install --user apache-libcloud
> >
> > Requirement already satisfied: apache-libcloud in
> >
> > /home/mex/.local/lib/python3.8/site-packages (3.3.1)
> >
> > Requirement already satisfied: requests>=2.5.0 in
> >
> > /home/mex/.local/lib/python3.8/site-packages (from apache-libcloud)
> >
> > (2.21.0)
> >
> > Requirement already satisfied: certifi>=2017.4.17 in
> >
> > /usr/local/lib/python3.8/site-packages (from
> >
> > requests>=2.5.0->apache-libcloud) (2020.12.5)
> >
> > Requirement already satisfied: idna<2.9,>=2.5 in
> >
> > /usr/lib/python3.8/site-packages (from
> >
> > requests>=2.5.0->apache-libcloud) (2.8)
> >
> > Requirement already satisfied: chardet<3.1.0,>=3.0.2 in
> >
> > /usr/lib/python3.8/site-packages (from
> >
> > requests>=2.5.0->apache-libcloud) (3.0.4)
> >
> > Requirement already satisfied: urllib3<1.25,>=1.21.1 in
> >
> > /home/mex/.local/lib/python3.8/site-packages (from
> >
> > requests>=2.5.0->apache-libcloud) (1.24.3)
> >
> > put if I run this script with just the import lines:
> >
> > import sys
> >
> > import os
> >
> > import libcloud
> >
> > from libcloud.compute.types import Provider
> >
> > from libcloud.compute.providers import get_driver
> >
> > I get this error:
> >
> > Traceback (most recent call last):
> >
> >   File "prova.py", line 3, in <module>
> >
> >     import libcloud
> >
> >   File "/home/mex/work/teaching/hpc/code/libcloud.py", line 1, in
> >
> > <module>
> >
> >     from libcloud.compute.types import Provider
> >
> > ModuleNotFoundError: No module named 'libcloud.compute'; 'libcloud' is
> >
> > not a package
> >
> > I've already tried to uninstall and re-install the package as
> >
> > suggested in some website, with no luck.
> >
> > Do you have any idea how to fix it?
> >
> > Thanks,
> >
> > Massimo

Re: weird problem: 'libcloud' is not a package

Posted by Massimo Canonico <ma...@uniupo.it>.
Please ignore my previous email.

It was my bad.

Sorry.

M

On 6/2/21 12:49 PM, Massimo Canonico wrote:
> Hi,
>
> on my Fedora, I have successfully installed the libcloud library:
>
> [mex@hope code]$ pip3 install --user apache-libcloud
> Requirement already satisfied: apache-libcloud in 
> /home/mex/.local/lib/python3.8/site-packages (3.3.1)
> Requirement already satisfied: requests>=2.5.0 in 
> /home/mex/.local/lib/python3.8/site-packages (from apache-libcloud) 
> (2.21.0)
> Requirement already satisfied: certifi>=2017.4.17 in 
> /usr/local/lib/python3.8/site-packages (from 
> requests>=2.5.0->apache-libcloud) (2020.12.5)
> Requirement already satisfied: idna<2.9,>=2.5 in 
> /usr/lib/python3.8/site-packages (from 
> requests>=2.5.0->apache-libcloud) (2.8)
> Requirement already satisfied: chardet<3.1.0,>=3.0.2 in 
> /usr/lib/python3.8/site-packages (from 
> requests>=2.5.0->apache-libcloud) (3.0.4)
> Requirement already satisfied: urllib3<1.25,>=1.21.1 in 
> /home/mex/.local/lib/python3.8/site-packages (from 
> requests>=2.5.0->apache-libcloud) (1.24.3)
>
> put if I run this script with just the import lines:
>
> import sys
> import os
> import libcloud
> from libcloud.compute.types import Provider
> from libcloud.compute.providers import get_driver
>
> I get this error:
>
> Traceback (most recent call last):
>   File "prova.py", line 3, in <module>
>     import libcloud
>   File "/home/mex/work/teaching/hpc/code/libcloud.py", line 1, in 
> <module>
>     from libcloud.compute.types import Provider
> ModuleNotFoundError: No module named 'libcloud.compute'; 'libcloud' is 
> not a package
>
>
> I've already tried to uninstall and re-install the package as 
> suggested in some website, with no luck.
>
> Do you have any idea how to fix it?
>
> Thanks,
>
> Massimo
>
>