Re: ModuleNotFoundError: No module named 'Paramiko'

2024-04-09 Thread Wenyong Wei via Python-list
hi Sravan,

Thanks for your response, checked and found there is only one python in my PC.




From: Sravan Kumar Chitikesi 
Sent: Tuesday, 9 April 2024 3:42 AM
To: Wenyong Wei 
Cc: python-list@python.org 
Subject: Re: ModuleNotFoundError: No module named 'Paramiko'

pip may be pointed to another python version. try to remove other python 
versions and re install pip

Regards,
Sravan Chitikesi
AWS Solutions Architect - Associate


On Mon, Apr 8, 2024 at 10:58 PM Wenyong Wei via Python-list 
mailto:python-list@python.org>> wrote:

Dear Sir/Madam,

Recently I encounter a problem that I can't import paramiko in my computer. My 
PC running on window 10 64 bits. I have investigate this issue via internet, 
there are a lot of solutions for this issue, after trying most of the steps, I 
still can't run this module, the major steps I have try are:


  1.
Install python ver 3.7.1 or 3.11.8 by itself or customer installation (changing 
the installation folder) and check add python to the path.
  2.
pip install paramiko, if ver 3.7.1 installed, need to upgrade the pip version.
  3.
Checking the environment path, there are two path related to the python, one 
for python.exe, the other for \Lib\site-packages\paramiko

can you please provide advice on this issue?



BR

Ken
--
https://mail.python.org/mailman/listinfo/python-list
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: ModuleNotFoundError: No module named 'Paramiko'

2024-04-09 Thread Mats Wichmann via Python-list

On 4/7/24 19:31, Wenyong Wei via Python-list wrote:


Dear Sir/Madam,

Recently I encounter a problem that I can't import paramiko in my computer. My 
PC running on window 10 64 bits. I have investigate this issue via internet, 
there are a lot of solutions for this issue, after trying most of the steps, I 
still can't run this module, the major steps I have try are:


   1.
Install python ver 3.7.1 or 3.11.8 by itself or customer installation (changing 
the installation folder) and check add python to the path.
   2.
pip install paramiko, if ver 3.7.1 installed, need to upgrade the pip version.
   3.
Checking the environment path, there are two path related to the python, one 
for python.exe, the other for \Lib\site-packages\paramiko

can you please provide advice on this issue?


Going to be more explicit than the other answers:

===
If an attempted import gives you ModuleNotFound, that *always* means the 
package is not installed... not at all, or just not in the paths that 
copy of Python is looking in.

===

The problem arises in part because most package installation 
instructions take the simplest approach and just tell you to (for example)


pip install paramiko

So it's installed. But where did it go? You can check where it went:

pip show paramiko

That path ("location") needs to be one where your Python interpreter is 
looking.


If all goes well, "pip" and "python" are perfectly matched, but in the 
current world, there are often several Python interpreters installed 
(projects may require a specific version, an IDE may grab its own 
version, something may create and setup a virtualenv, alternate worlds 
like Conda may set up a Python, the list goes on), and for any given 
installation on Windows, python.exe and the pip excutable pip.exe go in 
different directories anyway, and the Windows PATH doesn't always 
include both, and you easily get mismatches.


As others have said, the way to avoid mismatches is to use pip As A 
Module, specifically a module of the Python you want to use.  So if 
you're using the Python Launcher, that looks like:


py -m pip install paramiko

Hope this helps.

--
https://mail.python.org/mailman/listinfo/python-list


Re: ModuleNotFoundError: No module named 'Paramiko'

2024-04-08 Thread Thomas Passin via Python-list

On 4/8/2024 3:35 PM, Keith Thompson via Python-list wrote:

Thomas Passin  writes:

On 4/8/2024 2:01 PM, Dietmar Schwertberger via Python-list wrote:

To be sure, you can always go the the directory of the Python
interpreter and open a cmd window there.
(By entering 'cmd' into the explorer address bar.)
Then enter 'python.exe -mpip install paramiko'.
This way you can be sure that you're not running a pip.exe that
belongs to another Python interpreter.


This is not quite right. The best name of the Python executable may or
may not be "python.exe".  The command line needs a space after the
"-m":


No, the option and its argument can be bundled.  "-mpip" is equivalent
to "-m pip".  (The space might make it clearer for human readers.)


Oh, surprise, thanks for the correction. My apologies to Dietmar. I'd 
stick with the space, though, because it's often required by other 
programs.  No sense developing a conflicting habit...


--
https://mail.python.org/mailman/listinfo/python-list


Re: ModuleNotFoundError: No module named 'Paramiko'

2024-04-08 Thread Keith Thompson via Python-list
Thomas Passin  writes:
> On 4/8/2024 2:01 PM, Dietmar Schwertberger via Python-list wrote:
>> To be sure, you can always go the the directory of the Python
>> interpreter and open a cmd window there.
>> (By entering 'cmd' into the explorer address bar.)
>> Then enter 'python.exe -mpip install paramiko'.
>> This way you can be sure that you're not running a pip.exe that
>> belongs to another Python interpreter.
>
> This is not quite right. The best name of the Python executable may or
> may not be "python.exe".  The command line needs a space after the
> "-m":

No, the option and its argument can be bundled.  "-mpip" is equivalent
to "-m pip".  (The space might make it clearer for human readers.)

[...]

-- 
Keith Thompson (The_Other_Keith) keith.s.thompso...@gmail.com
Working, but not speaking, for Medtronic
void Void(void) { Void(); } /* The recursive call of the void */
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: ModuleNotFoundError: No module named 'Paramiko'

2024-04-08 Thread Thomas Passin via Python-list

On 4/8/2024 2:01 PM, Dietmar Schwertberger via Python-list wrote:
To be sure, you can always go the the directory of the Python 
interpreter and open a cmd window there.

(By entering 'cmd' into the explorer address bar.)
Then enter 'python.exe -mpip install paramiko'.
This way you can be sure that you're not running a pip.exe that belongs 
to another Python interpreter.


This is not quite right. The best name of the Python executable may or 
may not be "python.exe".  The command line needs a space after the "-m":


 -m pip install 

For , you can check if "python" runs the intended 
version by using the -V option (must be capitalized):


python -V

On Windows, Python from python.org usually installs a launcher named 
"py", which will run the last version installed:


py -m pip install ...

Or it can run a specific version, e.g.:

py -3.7 -m pip install ...

This will run Python 3.7 if installed.

On Linux, you can run the desired version with, e.g.,

python3.7 -m pip ...
--
https://mail.python.org/mailman/listinfo/python-list


Re: ModuleNotFoundError: No module named 'Paramiko'

2024-04-08 Thread Dietmar Schwertberger via Python-list
To be sure, you can always go the the directory of the Python 
interpreter and open a cmd window there.

(By entering 'cmd' into the explorer address bar.)
Then enter 'python.exe -mpip install paramiko'.
This way you can be sure that you're not running a pip.exe that belongs 
to another Python interpreter.


--
https://mail.python.org/mailman/listinfo/python-list


Re: ModuleNotFoundError: No module named 'Paramiko'

2024-04-08 Thread Sravan Kumar Chitikesi via Python-list
pip may be pointed to another python version. try to remove other python
versions and re install pip

Regards,
*Sravan Chitikesi*
AWS Solutions Architect - Associate


On Mon, Apr 8, 2024 at 10:58 PM Wenyong Wei via Python-list <
python-list@python.org> wrote:

>
> Dear Sir/Madam,
>
> Recently I encounter a problem that I can't import paramiko in my
> computer. My PC running on window 10 64 bits. I have investigate this issue
> via internet, there are a lot of solutions for this issue, after trying
> most of the steps, I still can't run this module, the major steps I have
> try are:
>
>
>   1.
> Install python ver 3.7.1 or 3.11.8 by itself or customer installation
> (changing the installation folder) and check add python to the path.
>   2.
> pip install paramiko, if ver 3.7.1 installed, need to upgrade the pip
> version.
>   3.
> Checking the environment path, there are two path related to the python,
> one for python.exe, the other for \Lib\site-packages\paramiko
>
> can you please provide advice on this issue?
>
>
>
> BR
>
> Ken
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


ModuleNotFoundError: No module named 'Paramiko'

2024-04-08 Thread Wenyong Wei via Python-list


Dear Sir/Madam,

Recently I encounter a problem that I can't import paramiko in my computer. My 
PC running on window 10 64 bits. I have investigate this issue via internet, 
there are a lot of solutions for this issue, after trying most of the steps, I 
still can't run this module, the major steps I have try are:


  1.
Install python ver 3.7.1 or 3.11.8 by itself or customer installation (changing 
the installation folder) and check add python to the path.
  2.
pip install paramiko, if ver 3.7.1 installed, need to upgrade the pip version.
  3.
Checking the environment path, there are two path related to the python, one 
for python.exe, the other for \Lib\site-packages\paramiko

can you please provide advice on this issue?



BR

Ken
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: ModuleNotFoundError

2022-06-17 Thread Joel Goldstick
On Fri, Jun 17, 2022 at 8:31 AM inhahe  wrote:
>
> sorry, I may have misused the term "namespace." I'm not sure what the
> proper word is for the names currently loaded into the global scope.
>
> On Fri, Jun 17, 2022 at 8:26 AM inhahe  wrote:
>
> > sys is a built-in module, but it's not in the namespace unless you import
> > it first.
> > before your print statement, enter "import sys"
> >
> > On Fri, Jun 17, 2022 at 8:23 AM  wrote:
> >
> >> Thank you for your email.
> >>
> >> C:\Users\zszen>python.exe
> >> Python 3.10.5 (tags/v3.10.5:f377153, Jun  6 2022, 16:14:13) [MSC v.1929
> >> 64 bit (AMD64)] on win32
> >> Type "help", "copyright", "credits" or "license" for more information.
> >> >>> print(sys.version)
> >> Traceback (most recent call last):
> >>   File "", line 1, in 
> >> NameError: name 'sys' is not defined
> >>
> >> >>> print(sys.executable)
> >> Traceback (most recent call last):
> >>   File "", line 1, in 
> >> NameError: name 'sys' is not defined
> >>
> >> On Fri, Jun 17, 2022, at 12:35 PM, Eryk Sun wrote:
> >> > On 6/17/22, Zoltan Szenderak  wrote:
> >> > >
> >> > > print(sys.version_info) and executable:
> >> > > Unable to initialize device PRN
> >> >
> >> > That's the command-line "print" program. You need to first start the
> >> > Python shell via python.exe. The prompt should change to ">>> ". Then
> >> > run print(sys.version) and print(sys.executable).
> >> >
> >> --
> >> https://mail.python.org/mailman/listinfo/python-list
> >>
> >
> --
> https://mail.python.org/mailman/listinfo/python-list

sys is a module that is part of 'batteries included' in python.  Since
it is not part of the language per se, you need to import it


-- 
Joel Goldstick
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: ModuleNotFoundError

2022-06-17 Thread inhahe
sorry, I may have misused the term "namespace." I'm not sure what the
proper word is for the names currently loaded into the global scope.

On Fri, Jun 17, 2022 at 8:26 AM inhahe  wrote:

> sys is a built-in module, but it's not in the namespace unless you import
> it first.
> before your print statement, enter "import sys"
>
> On Fri, Jun 17, 2022 at 8:23 AM  wrote:
>
>> Thank you for your email.
>>
>> C:\Users\zszen>python.exe
>> Python 3.10.5 (tags/v3.10.5:f377153, Jun  6 2022, 16:14:13) [MSC v.1929
>> 64 bit (AMD64)] on win32
>> Type "help", "copyright", "credits" or "license" for more information.
>> >>> print(sys.version)
>> Traceback (most recent call last):
>>   File "", line 1, in 
>> NameError: name 'sys' is not defined
>>
>> >>> print(sys.executable)
>> Traceback (most recent call last):
>>   File "", line 1, in 
>> NameError: name 'sys' is not defined
>>
>> On Fri, Jun 17, 2022, at 12:35 PM, Eryk Sun wrote:
>> > On 6/17/22, Zoltan Szenderak  wrote:
>> > >
>> > > print(sys.version_info) and executable:
>> > > Unable to initialize device PRN
>> >
>> > That's the command-line "print" program. You need to first start the
>> > Python shell via python.exe. The prompt should change to ">>> ". Then
>> > run print(sys.version) and print(sys.executable).
>> >
>> --
>> https://mail.python.org/mailman/listinfo/python-list
>>
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: ModuleNotFoundError

2022-06-17 Thread inhahe
sys is a built-in module, but it's not in the namespace unless you import
it first.
before your print statement, enter "import sys"

On Fri, Jun 17, 2022 at 8:23 AM  wrote:

> Thank you for your email.
>
> C:\Users\zszen>python.exe
> Python 3.10.5 (tags/v3.10.5:f377153, Jun  6 2022, 16:14:13) [MSC v.1929 64
> bit (AMD64)] on win32
> Type "help", "copyright", "credits" or "license" for more information.
> >>> print(sys.version)
> Traceback (most recent call last):
>   File "", line 1, in 
> NameError: name 'sys' is not defined
>
> >>> print(sys.executable)
> Traceback (most recent call last):
>   File "", line 1, in 
> NameError: name 'sys' is not defined
>
> On Fri, Jun 17, 2022, at 12:35 PM, Eryk Sun wrote:
> > On 6/17/22, Zoltan Szenderak  wrote:
> > >
> > > print(sys.version_info) and executable:
> > > Unable to initialize device PRN
> >
> > That's the command-line "print" program. You need to first start the
> > Python shell via python.exe. The prompt should change to ">>> ". Then
> > run print(sys.version) and print(sys.executable).
> >
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: ModuleNotFoundError

2022-06-17 Thread z . szenderak
Thank you for your email.

C:\Users\zszen>python.exe 
Python 3.10.5 (tags/v3.10.5:f377153, Jun  6 2022, 16:14:13) [MSC v.1929 64 bit 
(AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> print(sys.version)
Traceback (most recent call last):
  File "", line 1, in 
NameError: name 'sys' is not defined

>>> print(sys.executable) 
Traceback (most recent call last):
  File "", line 1, in 
NameError: name 'sys' is not defined

On Fri, Jun 17, 2022, at 12:35 PM, Eryk Sun wrote:
> On 6/17/22, Zoltan Szenderak  wrote:
> >
> > print(sys.version_info) and executable:
> > Unable to initialize device PRN
> 
> That's the command-line "print" program. You need to first start the
> Python shell via python.exe. The prompt should change to ">>> ". Then
> run print(sys.version) and print(sys.executable).
> 
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: ModuleNotFoundError

2022-06-17 Thread Eryk Sun
On 6/17/22, Zoltan Szenderak  wrote:
>
> print(sys.version_info) and executable:
> Unable to initialize device PRN

That's the command-line "print" program. You need to first start the
Python shell via python.exe. The prompt should change to ">>> ". Then
run print(sys.version) and print(sys.executable).
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: ModuleNotFoundError

2022-06-17 Thread 2QdxY4RzWzUUiLuE
On 2022-06-17 at 08:03:28 +,
Zoltan Szenderak  wrote:

> How do I reply to: Chris Angelico rosuav at gmail.com so it is listed
> on the Python list?

Please don't.  Please continue replying to python-list@python.org; that
way, other people can help you, and future programmers can find their
issues in the public archives.  ChrisA is a regular on this list, and
will see your replies on it.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: ModuleNotFoundError

2022-06-17 Thread Zoltan Szenderak
Re: https://mail.python.org/pipermail/python-list/2022-June/906698.html


How do I reply to: Chris Angelico rosuav at gmail.com so it is listed on the 
Python list?
Chris Angelico rosuav at 
gmail.com
Wed Jun 15 15:14:49 EDT 2022


What does "pip3 --version" tell you, and what happens if you print out

sys.version at the top of your script? Also possibly sys.executable,

in case your script isn't running from inside the venv that it looks

like it ought to be working in.

My reply:
Pip version
pip 22.1.2 from C:\Users\zszen\ENV\lib\site-packages\pip (python 3.10)

print(sys.version_info) and executable:
Unable to initialize device PRN


Kind regards,

Zoltan

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: ModuleNotFoundError

2022-06-15 Thread Chris Angelico
On Thu, 16 Jun 2022 at 05:00, Zoltan Szenderak  wrote:
>
>
>
> Only on my Windows 10, on my Windows 11 works perfectly. I uninstalled and 
> reinstalled python, it did not help, I tried everything I found online, 
> Stackoverflow, python.org, did not help. Not just this module, others too. 
> They are installed where they are supposed to be and they produce the name 
> not found error. Some modules work. The Path is set in the System Environment 
> Variables list.
>
> (env) C:\Users\zszen>req3.py
> Traceback (most recent call last):
>   File "C:\Users\zszen\env\Scripts\req3.py", line 2, in 
> import requests_html
> ModuleNotFoundError: No module named 'requests_html'
>
> (env) C:\Users\zszen>pip3 install requests_html
> Requirement already satisfied: requests_html in 
> c:\users\zszen\env\lib\site-packages (0.10.0)
> Requirement already satisfied: requests in 
> c:\users\zszen\env\lib\site-packages (from requests_html) (2.27.1)
> Requirement already satisfied: bs4 in c:\users\zszen\env\lib\site-packages 
> (from requests_html) (0.0.1)
> Requirement already satisfied: fake-useragent in 
> c:\users\zszen\env\lib\site-packages (from requests_html) (0.1.11)
> Requirement already satisfied: pyppeteer>=0.0.14 in 
> c:\users\zszen\env\lib\site-packages (from requests_html) (1.0.2)
> Requirement already satisfied: pyquery in 
> c:\users\zszen\env\lib\site-packages (from requests_html) (1.4.3)
> Requirement already satisfied: parse in c:\users\zszen\env\lib\site-packages 
> (from requests_html) (1.19.0)
> Requirement already satisfied: w3lib in c:\users\zszen\env\lib\site-packages 
> (from requests_html) (1.22.0)
> Requirement already satisfied: appdirs<2.0.0,>=1.4.3 in 
> c:\users\zszen\env\lib\site-packages (from pyppeteer>=0.0.14->requests_html) 
> (1.4.4)
> Requirement already satisfied: websockets<11.0,>=10.0 in 
> c:\users\zszen\env\lib\site-packages (from pyppeteer>=0.0.14->requests_html) 
> (10.3)
> Requirement already satisfied: urllib3<2.0.0,>=1.25.8 in 
> c:\users\zszen\env\lib\site-packages (from pyppeteer>=0.0.14->requests_html) 
> (1.26.9)
> Requirement already satisfied: tqdm<5.0.0,>=4.42.1 in 
> c:\users\zszen\env\lib\site-packages (from pyppeteer>=0.0.14->requests_html) 
> (4.64.0)
> Requirement already satisfied: importlib-metadata>=1.4 in 
> c:\users\zszen\env\lib\site-packages (from pyppeteer>=0.0.14->requests_html) 
> (4.11.4)
> Requirement already satisfied: pyee<9.0.0,>=8.1.0 in 
> c:\users\zszen\env\lib\site-packages (from pyppeteer>=0.0.14->requests_html) 
> (8.2.2)
> Requirement already satisfied: certifi>=2021 in 
> c:\users\zszen\env\lib\site-packages (from pyppeteer>=0.0.14->requests_html) 
> (2022.5.18.1)
> Requirement already satisfied: beautifulsoup4 in 
> c:\users\zszen\env\lib\site-packages (from bs4->requests_html) (4.11.1)
> Requirement already satisfied: cssselect>0.7.9 in 
> c:\users\zszen\env\lib\site-packages (from pyquery->requests_html) (1.1.0)
> Requirement already satisfied: lxml>=2.1 in 
> c:\users\zszen\env\lib\site-packages (from pyquery->requests_html) (4.9.0)
> Requirement already satisfied: charset-normalizer~=2.0.0 in 
> c:\users\zszen\env\lib\site-packages (from requests->requests_html) (2.0.12)
> Requirement already satisfied: idna<4,>=2.5 in 
> c:\users\zszen\env\lib\site-packages (from requests->requests_html) (3.3)
> Requirement already satisfied: six>=1.4.1 in 
> c:\users\zszen\env\lib\site-packages (from w3lib->requests_html) (1.16.0)
> Requirement already satisfied: zipp>=0.5 in 
> c:\users\zszen\env\lib\site-packages (from 
> importlib-metadata>=1.4->pyppeteer>=0.0.14->requests_html) (3.8.0)
> Requirement already satisfied: colorama in 
> c:\users\zszen\env\lib\site-packages (from 
> tqdm<5.0.0,>=4.42.1->pyppeteer>=0.0.14->requests_html) (0.4.4)
> Requirement already satisfied: soupsieve>1.2 in 
> c:\users\zszen\env\lib\site-packages (from 
> beautifulsoup4->bs4->requests_html) (2.3.2.post1)
>
> (env) C:\Users\zszen>
>

What does "pip3 --version" tell you, and what happens if you print out
sys.version at the top of your script? Also possibly sys.executable,
in case your script isn't running from inside the venv that it looks
like it ought to be working in.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


ModuleNotFoundError

2022-06-15 Thread Zoltan Szenderak



Only on my Windows 10, on my Windows 11 works perfectly. I uninstalled and 
reinstalled python, it did not help, I tried everything I found online, 
Stackoverflow, python.org, did not help. Not just this module, others too. They 
are installed where they are supposed to be and they produce the name not found 
error. Some modules work. The Path is set in the System Environment Variables 
list.

(env) C:\Users\zszen>req3.py
Traceback (most recent call last):
  File "C:\Users\zszen\env\Scripts\req3.py", line 2, in 
import requests_html
ModuleNotFoundError: No module named 'requests_html'

(env) C:\Users\zszen>pip3 install requests_html
Requirement already satisfied: requests_html in 
c:\users\zszen\env\lib\site-packages (0.10.0)
Requirement already satisfied: requests in c:\users\zszen\env\lib\site-packages 
(from requests_html) (2.27.1)
Requirement already satisfied: bs4 in c:\users\zszen\env\lib\site-packages 
(from requests_html) (0.0.1)
Requirement already satisfied: fake-useragent in 
c:\users\zszen\env\lib\site-packages (from requests_html) (0.1.11)
Requirement already satisfied: pyppeteer>=0.0.14 in 
c:\users\zszen\env\lib\site-packages (from requests_html) (1.0.2)
Requirement already satisfied: pyquery in c:\users\zszen\env\lib\site-packages 
(from requests_html) (1.4.3)
Requirement already satisfied: parse in c:\users\zszen\env\lib\site-packages 
(from requests_html) (1.19.0)
Requirement already satisfied: w3lib in c:\users\zszen\env\lib\site-packages 
(from requests_html) (1.22.0)
Requirement already satisfied: appdirs<2.0.0,>=1.4.3 in 
c:\users\zszen\env\lib\site-packages (from pyppeteer>=0.0.14->requests_html) 
(1.4.4)
Requirement already satisfied: websockets<11.0,>=10.0 in 
c:\users\zszen\env\lib\site-packages (from pyppeteer>=0.0.14->requests_html) 
(10.3)
Requirement already satisfied: urllib3<2.0.0,>=1.25.8 in 
c:\users\zszen\env\lib\site-packages (from pyppeteer>=0.0.14->requests_html) 
(1.26.9)
Requirement already satisfied: tqdm<5.0.0,>=4.42.1 in 
c:\users\zszen\env\lib\site-packages (from pyppeteer>=0.0.14->requests_html) 
(4.64.0)
Requirement already satisfied: importlib-metadata>=1.4 in 
c:\users\zszen\env\lib\site-packages (from pyppeteer>=0.0.14->requests_html) 
(4.11.4)
Requirement already satisfied: pyee<9.0.0,>=8.1.0 in 
c:\users\zszen\env\lib\site-packages (from pyppeteer>=0.0.14->requests_html) 
(8.2.2)
Requirement already satisfied: certifi>=2021 in 
c:\users\zszen\env\lib\site-packages (from pyppeteer>=0.0.14->requests_html) 
(2022.5.18.1)
Requirement already satisfied: beautifulsoup4 in 
c:\users\zszen\env\lib\site-packages (from bs4->requests_html) (4.11.1)
Requirement already satisfied: cssselect>0.7.9 in 
c:\users\zszen\env\lib\site-packages (from pyquery->requests_html) (1.1.0)
Requirement already satisfied: lxml>=2.1 in 
c:\users\zszen\env\lib\site-packages (from pyquery->requests_html) (4.9.0)
Requirement already satisfied: charset-normalizer~=2.0.0 in 
c:\users\zszen\env\lib\site-packages (from requests->requests_html) (2.0.12)
Requirement already satisfied: idna<4,>=2.5 in 
c:\users\zszen\env\lib\site-packages (from requests->requests_html) (3.3)
Requirement already satisfied: six>=1.4.1 in 
c:\users\zszen\env\lib\site-packages (from w3lib->requests_html) (1.16.0)
Requirement already satisfied: zipp>=0.5 in 
c:\users\zszen\env\lib\site-packages (from 
importlib-metadata>=1.4->pyppeteer>=0.0.14->requests_html) (3.8.0)
Requirement already satisfied: colorama in c:\users\zszen\env\lib\site-packages 
(from tqdm<5.0.0,>=4.42.1->pyppeteer>=0.0.14->requests_html) (0.4.4)
Requirement already satisfied: soupsieve>1.2 in 
c:\users\zszen\env\lib\site-packages (from beautifulsoup4->bs4->requests_html) 
(2.3.2.post1)

(env) C:\Users\zszen>

Kind regards,

Zoltan


-- 
https://mail.python.org/mailman/listinfo/python-list


Re: ModuleNotFoundError: No module named 'DistUtilsExtra'

2022-01-02 Thread hongy...@gmail.com
On Monday, January 3, 2022 at 6:15:53 AM UTC+8, Marco Sulla wrote:
> https://askubuntu.com/questions/584857/distutilsextra-problem

I found its Git repository using the following method:

$ for i in python-distutils-extra python3-distutils-extra; do apt showsrc $i |& 
grep git; done | sort -u
Vcs-Git: https://salsa.debian.org/python-team/modules/python-distutils-extra.git

Therefore, for developers, the more robust and reasonable pdfarranger 
installation steps should be as follows:

#https://github.com/pdfarranger/pdfarranger#install-from-source
$ sudo apt install gir1.2-gtk-3.0 gir1.2-poppler-0.18 
$ git clone https://github.com/pdfarranger/pdfarranger.git pdfarranger.git 
$ cd pdfarranger.git 
$ pyenv shell 3.8.3
$ pyenv virtualenv --system-site-packages pdfarranger
$ pyenv shell pdfarranger 
$ pip install -U pip
$ pip install 
git+https://salsa.debian.org/python-team/modules/python-distutils-extra.git
$ pip install img2pdf pygobject
$ pip install .

Another note: the python-distutils-extra or python3-distutils-extra is only a 
dependency in the installation process, once the package is installed, it will 
no longer be needed.

For a more detailed discussion, please see here [1].

[1] 
https://github.com/pdfarranger/pdfarranger/issues/604#issuecomment-1003801361

Regards,
HZ
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: ModuleNotFoundError: No module named 'DistUtilsExtra'

2022-01-02 Thread Marco Sulla
https://askubuntu.com/questions/584857/distutilsextra-problem

On Sun, 2 Jan 2022 at 18:52, hongy...@gmail.com  wrote:
>
> On Ubuntu 20.04.3 LTS, I try to install pdfarranger [1] as follows but failed:
>
> $ sudo apt-get install python3-pip python3-distutils-extra \
>   python3-wheel python3-gi 
> python3-gi-cairo \
>   gir1.2-gtk-3.0 gir1.2-poppler-0.18 
> python3-setuptools
> $ git clone https://github.com/pdfarranger/pdfarranger.git pdfarranger.git
> $ cd pdfarranger.git
> $ pyenv shell 3.8.3
> $ pyenv virtualenv --system-site-packages pdfarranger
> $ pyenv shell pdfarranger
> $ pip install -U pip
> $ ./setup.py build
> Traceback (most recent call last):
>   File "./setup.py", line 24, in 
> from DistUtilsExtra.command import (
> ModuleNotFoundError: No module named 'DistUtilsExtra'
>
>
> See the following for the package list installed in this virtualenv:
>
> $ pip list
> PackageVersion
> -- 
> pip21.3.1
> pyfiglet   0.8.post1
> setuptools 41.2.0
> vtk9.0.20200612
>
> Any hints for fixing this problem? Also see here [2-3] for relevant 
> discussions.
>
> [1] https://github.com/pdfarranger/pdfarranger
> [2] https://github.com/pdfarranger/pdfarranger/issues/604
> [3] 
> https://discuss.python.org/t/modulenotfounderror-no-module-named-distutilsextra/12834
>
> Regards,
> HZ
> --
> https://mail.python.org/mailman/listinfo/python-list
-- 
https://mail.python.org/mailman/listinfo/python-list


ModuleNotFoundError: No module named 'DistUtilsExtra'

2022-01-02 Thread hongy...@gmail.com
On Ubuntu 20.04.3 LTS, I try to install pdfarranger [1] as follows but failed:

$ sudo apt-get install python3-pip python3-distutils-extra \
  python3-wheel python3-gi python3-gi-cairo 
\
  gir1.2-gtk-3.0 gir1.2-poppler-0.18 
python3-setuptools
$ git clone https://github.com/pdfarranger/pdfarranger.git pdfarranger.git
$ cd pdfarranger.git
$ pyenv shell 3.8.3
$ pyenv virtualenv --system-site-packages pdfarranger
$ pyenv shell pdfarranger 
$ pip install -U pip
$ ./setup.py build
Traceback (most recent call last):
  File "./setup.py", line 24, in 
from DistUtilsExtra.command import (
ModuleNotFoundError: No module named 'DistUtilsExtra'


See the following for the package list installed in this virtualenv:

$ pip list 
PackageVersion
-- 
pip21.3.1
pyfiglet   0.8.post1
setuptools 41.2.0
vtk9.0.20200612

Any hints for fixing this problem? Also see here [2-3] for relevant discussions.

[1] https://github.com/pdfarranger/pdfarranger
[2] https://github.com/pdfarranger/pdfarranger/issues/604
[3] 
https://discuss.python.org/t/modulenotfounderror-no-module-named-distutilsextra/12834

Regards,
HZ
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Debian Buster: ModuleNotFoundError: No module named 'mysql'

2020-05-07 Thread rackflot
i have figured it out. When i made the database, i made it with root access. I 
think i had to do that to make it accessable for a webpage. 

i changed to SU and installed this. 

pip install mysql-connector-python-rf and the other listed above. dumped out of 
su then tried it again. it worked.

So, the package installed under my normal login it seems did not have the 
access that mysql needed for root. hmm. 
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Debian Buster: ModuleNotFoundError: No module named 'mysql'

2020-05-07 Thread rackflot
On Thursday, May 7, 2020 at 7:57:14 AM UTC-4, MRAB wrote:
> On 2020-05-07 12:30, rackf...@gmail.com wrote:
> > I have the same issue. I use visual code from Ms and the remote debugging 
> > over an ssh.
> > I am able to do all mysql while in the debugger but running on command line 
> > does not work.
> > The DB is logged in as root as this was the only way I could make it work.
> > 
> > pi@raspberrypi:~/blescan/iBeacon-Scanner-$ pip search mysql-connector | 
> > grep --color mysql-connector-python
> > mysql-connector-python (8.0.20)   - MySQL driver written in 
> > Python
> > mysql-connector-python-dd (2.0.2) - MySQL driver written in 
> > Python
> > mysql-connector-python-rf (2.2.2) - MySQL driver written in 
> > Python
> > pi@raspberrypi:~/blescan/iBeacon-Scanner-$ pip install 
> > mysql-connector-python-rf
> > Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
> > Requirement already satisfied: mysql-connector-python-rf in 
> > /home/pi/.local/lib/python3.7/site-packages (2.2.2)
> > pi@raspberrypi:~/blescan/iBeacon-Scanner-$ sudo python3 BeaconClass.py
> > Traceback (most recent call last):  File 
> > "BeaconClass.py", line 7, in 
> >  import mysql.connector as mariadb 
> > ModuleNotFoundError: No module named 'mysql'
> > pi@raspberrypi:~/blescan/iBeacon-Scanner-$
> > 
> I believe that it's "pip" for "python" (Python 2) and "pip3" for 
> "python3" (Python 3).
> 
> Personally, I'd use:
> 
> python3 -m pip ...
> 
> or:
> 
> sudo python3 -m pip ...
> 
> instead.

This only happens when on the command line trying to run the python script. it 
works fine in visual studio code. 

Resinstalled all of the packages mentioned above, it keeps saying it is all 
fine. 

What is different in MS debugger?
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Debian Buster: ModuleNotFoundError: No module named 'mysql'

2020-05-07 Thread MRAB

On 2020-05-07 12:30, rackf...@gmail.com wrote:

I have the same issue. I use visual code from Ms and the remote debugging over 
an ssh.
I am able to do all mysql while in the debugger but running on command line 
does not work.
The DB is logged in as root as this was the only way I could make it work.

pi@raspberrypi:~/blescan/iBeacon-Scanner-$ pip search mysql-connector | grep 
--color mysql-connector-python
mysql-connector-python (8.0.20)   - MySQL driver written in Python
mysql-connector-python-dd (2.0.2) - MySQL driver written in Python
mysql-connector-python-rf (2.2.2) - MySQL driver written in Python
pi@raspberrypi:~/blescan/iBeacon-Scanner-$ pip install mysql-connector-python-rf
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: mysql-connector-python-rf in 
/home/pi/.local/lib/python3.7/site-packages (2.2.2)
pi@raspberrypi:~/blescan/iBeacon-Scanner-$ sudo python3 BeaconClass.py
Traceback (most recent call last):  File 
"BeaconClass.py", line 7, in 
 import mysql.connector as mariadb 
ModuleNotFoundError: No module named 'mysql'
pi@raspberrypi:~/blescan/iBeacon-Scanner-$

I believe that it's "pip" for "python" (Python 2) and "pip3" for 
"python3" (Python 3).


Personally, I'd use:

python3 -m pip ...

or:

sudo python3 -m pip ...

instead.
--
https://mail.python.org/mailman/listinfo/python-list


Re: Debian Buster: ModuleNotFoundError: No module named 'mysql'

2020-05-07 Thread rackflot
I have the same issue. I use visual code from Ms and the remote debugging over 
an ssh. 
I am able to do all mysql while in the debugger but running on command line 
does not work. 
The DB is logged in as root as this was the only way I could make it work.

pi@raspberrypi:~/blescan/iBeacon-Scanner-$ pip search mysql-connector | grep 
--color mysql-connector-python
mysql-connector-python (8.0.20)   - MySQL driver written in Python
mysql-connector-python-dd (2.0.2) - MySQL driver written in Python
mysql-connector-python-rf (2.2.2) - MySQL driver written in Python
pi@raspberrypi:~/blescan/iBeacon-Scanner-$ pip install mysql-connector-python-rf
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: mysql-connector-python-rf in 
/home/pi/.local/lib/python3.7/site-packages (2.2.2)
pi@raspberrypi:~/blescan/iBeacon-Scanner-$ sudo python3 BeaconClass.py
Traceback (most recent call last):  File 
"BeaconClass.py", line 7, in 
import mysql.connector as mariadb 
ModuleNotFoundError: No module named 'mysql'
pi@raspberrypi:~/blescan/iBeacon-Scanner-$
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: ModuleNotFoundError, even though I can see module in dist-packages folder, Setuptools / EGG issue?

2020-04-08 Thread John Ladasky
On Wednesday, April 8, 2020 at 10:47:42 AM UTC-7, John Ladasky wrote:
> Hi folks,
> 
> Something broke in my Python installation in the past two or three days.  I'm 
> working in Ubuntu 19.10 and Python 3.7, without virtual environments.  
> 
> I have two modules of Python source code that I am developing.  I regularly 
> change this code and "distribute" it to myself using setuptools.  From the 
> command prompt in the module's base folder, I execute:
> 
>   python3 setup.py sdist
>   sudo python3 setup.py install
> 
> That process has been working for me for years.  But after recent rebuilds, 
> when I try to import those modules today, I get ModuleNotFoundErrors for each 
> of them.  I tried importing other modules that were installed by pip3.  They 
> work fine.
> 
> I looked in /usr/local/lib/python3.7/dist-packages.  The one thing that is 
> unique to my two packages is the .egg extension at the end of the file names. 
>  Oddly, one of the two modules is a single .egg archive file, and the other 
> is a normal folder with folders inside it, despite the .egg extension in the 
> name.
> 
> A third package of mine which I did not build recently appears as a normal 
> sub-folder within dist-packages, and it imports correctly.
> 
> What is setuptools supposed to do?  Why has its behavior apparently changed?  
> Hope someone can offer some advice.  Thanks.

Followup observation:

One of the two Python packages I'm building using setuptools depends on 
argparse 1.4.  The default version of argparse in my Python 3.7 distro is 1.1. 
 I watched setuptools fetch argparse 1.4 from the Net when I built it.

When I start my Python interpreter and import argparse, I get version 1.1.

I found an argparse 1.4 sub-folder in my site-packages folder.  It was built 
yesterday.  It has a .egg extension, just like my two modules that won't import.
-- 
https://mail.python.org/mailman/listinfo/python-list


ModuleNotFoundError, even though I can see module in dist-packages folder, Setuptools / EGG issue?

2020-04-08 Thread John Ladasky
Hi folks,

Something broke in my Python installation in the past two or three days.  I'm 
working in Ubuntu 19.10 and Python 3.7, without virtual environments.  

I have two modules of Python source code that I am developing.  I regularly 
change this code and "distribute" it to myself using setuptools.  From the 
command prompt in the module's base folder, I execute:

  python3 setup.py sdist
  sudo python3 setup.py install

That process has been working for me for years.  But after recent rebuilds, 
when I try to import those modules today, I get ModuleNotFoundErrors for each 
of them.  I tried importing other modules that were installed by pip3.  They 
work fine.

I looked in /usr/local/lib/python3.7/dist-packages.  The one thing that is 
unique to my two packages is the .egg extension at the end of the file names.  
Oddly, one of the two modules is a single .egg archive file, and the other is a 
normal folder with folders inside it, despite the .egg extension in the name.

A third package of mine which I did not build recently appears as a normal 
sub-folder within dist-packages, and it imports correctly.

What is setuptools supposed to do?  Why has its behavior apparently changed?  
Hope someone can offer some advice.  Thanks.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Debian Buster: ModuleNotFoundError: No module named 'mysql'

2020-01-19 Thread 황병희
^Bart  writes:

>> pip is probably defaulting to Python 2.7. Try using pip3, or this more
>> explicit syntax:
>
> Now it works!
>
> Python 3.7.3 (default, Apr  3 2019, 05:39:12)
> [GCC 8.3.0] on linux
> Type "help", "copyright", "credits" or "license()" for more information.

> == RESTART: /home/gabriele/Corso_4.0/Python/Test_MySQL2.py
> ==
> 


Wow, what a beautiful Debian-Python ^^^

Sincerely, Linux fan Byung-Hee

-- 
^고맙습니다 _地平天成_ 감사합니다_^))//
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Debian Buster: ModuleNotFoundError: No module named 'mysql'

2020-01-18 Thread ^Bart

pip is probably defaulting to Python 2.7. Try using pip3, or this more
explicit syntax:


Now it works!

Python 3.7.3 (default, Apr  3 2019, 05:39:12)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license()" for more information.
>>>
== RESTART: /home/gabriele/Corso_4.0/Python/Test_MySQL2.py 
==


>>>

I solved the "issue" by:

# aptitude install python3-pip

$ python3 -m pip install mysql-connector

$ python3 -m pip search mysql-connector | grep --color 
mysql-connector-python


$ python3 -m pip install mysql-connector-python-rf

# aptitude install python3-mysqldb

^Bart
--
https://mail.python.org/mailman/listinfo/python-list


Re: Debian Buster: ModuleNotFoundError: No module named 'mysql'

2020-01-18 Thread Michael Torrie
On 1/18/20 9:03 AM, ^Bart wrote:
>> What could I do to fix this issue?! :\
> 
> I understood I have Python 2.7 and Python 3 but I can't install modules 
> on Python 3... :\
> 
> ^Bart

pip is probably defaulting to Python 2.7. Try using pip3, or this more
explicit syntax:

python3 -m pip install 


-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Debian Buster: ModuleNotFoundError: No module named 'mysql'

2020-01-18 Thread ^Bart

What could I do to fix this issue?! :\


I understood I have Python 2.7 and Python 3 but I can't install modules 
on Python 3... :\


^Bart
--
https://mail.python.org/mailman/listinfo/python-list


Debian Buster: ModuleNotFoundError: No module named 'mysql'

2020-01-18 Thread ^Bart

Hi guys,

I'd like to use Python to connect to my MariaDB db, it works from 
phpmyadmin and if I open a console with mysql -u root -p.


I tried:

$ pip search mysql-connector | grep --color mysql-connector-python

mysql-connector-python (8.0.19)   - MySQL driver 
written in Python
mysql-connector-python-rf (2.2.2) - MySQL driver 
written in Python
mysql-connector-python-dd (2.0.2) - MySQL driver 
written in Python


$ pip install mysql-connector-python-rf

Requirement already satisfied: mysql-connector-python-rf in 
/usr/local/lib/python2.7/dist-packages (2.2.2)


When I try my code (obviously I replaced parameters with mine!):

import mysql.connector

mydb = mysql.connector.connect(
  host="localhost",
  user="root",
  passwd="mypwd"
)

print(mydb)

I have:

Traceback (most recent call last):
  File "/home/gabriele/Corso_4.0/Python/Test_MySQL2.py", line 1, in 


    import mysql.connector
ModuleNotFoundError: No module named 'mysql'
>>>

What could I do to fix this issue?! :\

Thanks!
^Bart
--
https://mail.python.org/mailman/listinfo/python-list


Re: ModuleNotFoundError: No module named 'email.mime'; 'email' is not a package

2019-12-08 Thread DL Neil via Python-list

On 9/12/19 8:13 AM, b...@bbhoyer.com wrote:

Just registered
Thanks


Hi @bob, welcome to the gang...



  I am a beginner in Python, been working on class material from Mosh

...


  from email.mime.multipart import MIMEMultipart

...


  Here is the error message:
  Traceback (most recent call last):
    File "c:\Users\Owner\Desktop\HelloWorld\[5]email.py", line 1, in 

  from email.mime.multipart import MIMEMultipart
    File "c:\Users\Owner\Desktop\HelloWorld\[6]email.py", line 1, in 

  from email.mime.multipart import MIMEMultipart
  ModuleNotFoundError: No module named 'email.mime'; 'email' is not a 
package
  I have spent some time trying to figure out resolve ...
  Can you help me with this pistol of a problem …



("pistol"? ...he says, manfully-struggling with the temptation to 
suggest that you "make love not war"...)



Let's look at the information given (in the "stack trace":

<<package>>>


On line 1, the code requests that a module named/addressed as 
"email.mime.multipart" be located ("found"), and an object 
("MIMEMultipart") be imported (etc, etc).


So, when executing line 1, Python was unable to find the specified 
module (let's over-simplify and use the word: "file").



Libraries from the Python Standard Library are not included in the basic 
"python" download, and have to be added/separately downloaded, when 
needed. I suspect this is the problem (but may not be)!



Sadly, I am not a user of MS-Win, so am loath to try to help much more, 
for fear of leading you along the wrong track.  Herewith some self-study 
which should put your boots (back) on the ground...



WebRefs: installing packages
This is more readable: 
https://protechguides.com/how-to-install-python-library/
This is from 'the book of words': 
https://packaging.python.org/tutorials/installing-packages/


NB I understand that "pip" is installed on MS-Win as part of python, so 
you don't need to worry about that/can quickly check. If your course has 
not taken you through "virtual environments" then feel free to ignore 
such, for now.

--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list


Re: ModuleNotFoundError: No module named 'email.mime'; 'email' is not a package

2019-12-08 Thread MRAB

On 2019-12-08 19:13, b...@bbhoyer.com wrote:

Just registered
Thanks

   Original Message 
  Subject: ModuleNotFoundError: No module named 'email.mime'; 'email' is
  not a package
  From: <[1]b...@bbhoyer.com>
  Date: Sun, December 08, 2019 11:14 am
  To: [2]python-list@python.org

  Hello Python Team,
  I am a beginner in Python, been working on class material from Mosh
  youtube 6 hrs., Mosh 12 hr paid course; Python Cash Course by Eric
  Matthes  … most of the time everything works just fine or a little
  adjustment for updated versions.
  I am running Python 3.8.0
  In example, Mosh 12 hr course, he did an exercise on sending email from
  within Python, so here is the code :
  from email.mime.multipart import MIMEMultipart
  from email.mime.text import MIMEText
  import smtplib
  message = MIMEMultipart()
  message["from"] = "Bob Hoyer = Python"
  message["to"] = "[3]b...@bbhoyer.com"
  message["subject"] = "This is a test using Python"
  message.attach(MIMEText("Body"))
  # godaddy recommended SMTP_SSL, host name & port #
  with smtplib.SMTP(host="smtpout.secureserver.net", port=465) as smtp:
  smtp.ehlo()
  # godaddy recommended removing ...
  # smtp.starttls()
  smtp.login("[4]em...@email.com", "password")  #email login &
  password blanked out for this msg
  smtp.send_message(message)
  print("Sent ...")
  smtp.close()
  Here is the error message:
  Traceback (most recent call last):
    File "c:\Users\Owner\Desktop\HelloWorld\[5]email.py", line 1, in 

  from email.mime.multipart import MIMEMultipart
        File "c:\Users\Owner\Desktop\HelloWorld\[6]email.py", line 1, in 

  from email.mime.multipart import MIMEMultipart
  ModuleNotFoundError: No module named 'email.mime'; 'email' is not a 
package
  I have spent some time trying to figure out resolve ...
  Can you help me with this pistol of a problem …
  Bob Hoyer


[snip]
I notice you have files called "[5]email.py" and "[6]email.py". Do you 
also have one called "email.py"?


If so, then what's happening is that Python is finding that one before 
the one in the stdlib.

--
https://mail.python.org/mailman/listinfo/python-list


RE: ModuleNotFoundError: No module named 'email.mime'; 'email' is not a package

2019-12-08 Thread bob
   Just registered 
   Thanks

  Original Message 
 Subject: ModuleNotFoundError: No module named 'email.mime'; 'email' is
 not a package
 From: <[1]b...@bbhoyer.com>
 Date: Sun, December 08, 2019 11:14 am
 To: [2]python-list@python.org

 Hello Python Team, 
 I am a beginner in Python, been working on class material from Mosh
 youtube 6 hrs., Mosh 12 hr paid course; Python Cash Course by Eric
 Matthes  … most of the time everything works just fine or a little
 adjustment for updated versions.
 I am running Python 3.8.0 
 In example, Mosh 12 hr course, he did an exercise on sending email from
 within Python, so here is the code :
 from email.mime.multipart import MIMEMultipart
 from email.mime.text import MIMEText
 import smtplib
 message = MIMEMultipart()
 message["from"] = "Bob Hoyer = Python"
 message["to"] = "[3]b...@bbhoyer.com"
 message["subject"] = "This is a test using Python"
 message.attach(MIMEText("Body"))
 # godaddy recommended SMTP_SSL, host name & port #
 with smtplib.SMTP(host="smtpout.secureserver.net", port=465) as smtp:
 smtp.ehlo()
 # godaddy recommended removing ...
 # smtp.starttls()
 smtp.login("[4]em...@email.com", "password")  #email login &
 password blanked out for this msg
 smtp.send_message(message)
 print("Sent ...")
 smtp.close()
 Here is the error message: 
 Traceback (most recent call last):
   File "c:\Users\Owner\Desktop\HelloWorld\[5]email.py", line 1, in 
 from email.mime.multipart import MIMEMultipart
   File "c:\Users\Owner\Desktop\HelloWorld\[6]email.py", line 1, in 
 from email.mime.multipart import MIMEMultipart
 ModuleNotFoundError: No module named 'email.mime'; 'email' is not a package
 I have spent some time trying to figure out resolve ...
 Can you help me with this pistol of a problem … 
 Bob Hoyer

References

   Visible links
   1. mailto:b...@bbhoyer.com
   2. mailto:python-list@python.org
   3. mailto:b...@bbhoyer.com
   4. mailto:em...@email.com
   5. http://email.py/
   6. http://email.py/
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: ModuleNotFoundError with click module

2019-12-02 Thread Tim Johnson



On 12/1/19 11:46 PM, Peter Otten wrote:

Tim Johnson wrote:


OK. Now I have

/usr/local/lib/python3.7/site-packages/Click-7.0.dist-info/

which holds the following files:

INSTALLER  LICENSE.txt  METADATA  RECORD  top_level.txt  WHEEL

I haven't a clue as to how to proceed! Never seen this before ...

Just leave it alone ;)


Furthermore, google is offering me nothing conclusive.

Where to go from here!

P.S. It looks like that directory is sort of a stub; regardless of my
take on it I am no longer having the ModuleNotFoundError.

Once you can import it you can find the actual module or package with

$ /usr/bin/python3.7 -c 'import click; print(click.__file__)'

In this case it's a package, so you'll probably see (something like)

/usr/local/lib/python3.7/site-packages/click/__init__.py

rather than

/usr/local/lib/python3.7/site-packages/click.py
/usr/local/lib/python3.7/site-packages/


Good Explanation. Thanks again Peter.  new since python 1.5 

--
Tim
tj49.com

--
https://mail.python.org/mailman/listinfo/python-list


Re: ModuleNotFoundError with click module

2019-12-02 Thread Peter Otten
Tim Johnson wrote:

>> OK. Now I have
>>
>> /usr/local/lib/python3.7/site-packages/Click-7.0.dist-info/
>>
>> which holds the following files:
>>
>> INSTALLER  LICENSE.txt  METADATA  RECORD  top_level.txt  WHEEL
>>
>> I haven't a clue as to how to proceed! Never seen this before ...

Just leave it alone ;)

>> Furthermore, google is offering me nothing conclusive.
>>
>> Where to go from here!
> 
> P.S. It looks like that directory is sort of a stub; regardless of my
> take on it I am no longer having the ModuleNotFoundError.

Once you can import it you can find the actual module or package with

$ /usr/bin/python3.7 -c 'import click; print(click.__file__)'

In this case it's a package, so you'll probably see (something like)

/usr/local/lib/python3.7/site-packages/click/__init__.py

rather than

/usr/local/lib/python3.7/site-packages/click.py
/usr/local/lib/python3.7/site-packages/

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: ModuleNotFoundError with click module

2019-12-01 Thread Tim Johnson


On 12/1/19 3:41 PM, Tim Johnson wrote:


On 12/1/19 12:26 AM, Peter Otten wrote:

Tim Johnson wrote:


Using linux ubuntu 16.04 with bash shell.
Am retired python programmer, but not terribly current.
I have moderate bash experience.

When trying to install pgadmin4 via apt I get the following error
traceback when pgadmin4 is invoked:

Traceback (most recent call last):
  File "setup.py", line 17, in 
  from pgadmin.model import db, User, Version, ServerGroup, Server, \
  File "/usr/share/pgadmin4/web/pgadmin/__init__.py", line 19, in 

  from flask import Flask, abort, request, current_app, session, 
url_for

  File "/usr/local/lib/python3.7/site-packages/flask/__init__.py", line
21, in 
  from .app import Flask
  File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 34,
in 
  from . import cli
File "/usr/local/lib/python3.7/site-packages/flask/cli.py", line 25, in

import click
ModuleNotFoundError: No module named 'click'


If I invoke python3 (/usr/local/bin/python3), version 3.7.2 and invoke
  >>> import click
click is imported successfully.

In this invocation, sys.path is:
['', '/usr/local/lib/python37.zip', '/usr/local/lib/python3.7',
'/usr/local/lib/python3.7/lib-dynload',
'/home/tim/.local/lib/python3.7/site-packages',
'/usr/local/lib/python3.7/site-packages']

$PYTHONPATH is empty when the bash shell is invoked

$PATH as follows:

/home/tim/bin:/home/tim/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin 


click.py can be found at
/usr/local/lib/python3.7/site-packages/pipenv/patched/piptools/
in turn click.py imports click, presumably as the package,
which appears to be at
/usr/local/lib/python3.7/site-packages/pipenv/vendor/click

Any number of settings of PYTHONPATH to the various paths above has
failed to resolve the ModuleNotFoundError
Same issues with attempting install from a virtual environment.

Any help will be appreciated.
thanks
tim

I'm too lazy to look into the details of your paths -- I'd just make 
sure
that click is installed with the same interpreter and user as 
pgadmin4, e.

g. globally

$ sudo /usr/local/bin/python3 -m pip install click
$ sudo /usr/local/bin/python3 path/to/setup.py install  # or whatever it
takes to install pgadmin4


OK. Now I have

/usr/local/lib/python3.7/site-packages/Click-7.0.dist-info/

which holds the following files:

INSTALLER  LICENSE.txt  METADATA  RECORD  top_level.txt  WHEEL

I haven't a clue as to how to proceed! Never seen this before ...

Furthermore, google is offering me nothing conclusive.

Where to go from here!


P.S. It looks like that directory is sort of a stub; regardless of my 
take on it I am no longer having the ModuleNotFoundError.


Peter has a been a great help. Couldn't have done it without him.

cheers

--
Tim
tj49.com

--
https://mail.python.org/mailman/listinfo/python-list


Re: ModuleNotFoundError with click module

2019-12-01 Thread Tim Johnson


On 12/1/19 12:26 AM, Peter Otten wrote:

Tim Johnson wrote:


Using linux ubuntu 16.04 with bash shell.
Am retired python programmer, but not terribly current.
I have moderate bash experience.

When trying to install pgadmin4 via apt I get the following error
traceback when pgadmin4 is invoked:

Traceback (most recent call last):
  File "setup.py", line 17, in 
  from pgadmin.model import db, User, Version, ServerGroup, Server, \
  File "/usr/share/pgadmin4/web/pgadmin/__init__.py", line 19, in 
  from flask import Flask, abort, request, current_app, session, url_for
  File "/usr/local/lib/python3.7/site-packages/flask/__init__.py", line
21, in 
  from .app import Flask
  File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 34,
in 
  from . import cli
File "/usr/local/lib/python3.7/site-packages/flask/cli.py", line 25, in

import click
ModuleNotFoundError: No module named 'click'


If I invoke python3 (/usr/local/bin/python3), version 3.7.2 and invoke
  >>> import click
click is imported successfully.

In this invocation, sys.path is:
['', '/usr/local/lib/python37.zip', '/usr/local/lib/python3.7',
'/usr/local/lib/python3.7/lib-dynload',
'/home/tim/.local/lib/python3.7/site-packages',
'/usr/local/lib/python3.7/site-packages']

$PYTHONPATH is empty when the bash shell is invoked

$PATH as follows:


/home/tim/bin:/home/tim/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

click.py can be found at
/usr/local/lib/python3.7/site-packages/pipenv/patched/piptools/
in turn click.py imports click, presumably as the package,
which appears to be at
/usr/local/lib/python3.7/site-packages/pipenv/vendor/click

Any number of settings of PYTHONPATH to the various paths above has
failed to resolve the ModuleNotFoundError
Same issues with attempting install from a virtual environment.

Any help will be appreciated.
thanks
tim


I'm too lazy to look into the details of your paths -- I'd just make sure
that click is installed with the same interpreter and user as pgadmin4, e.
g. globally

$ sudo /usr/local/bin/python3 -m pip install click
$ sudo /usr/local/bin/python3 path/to/setup.py install  # or whatever it
takes to install pgadmin4


OK. Now I have

/usr/local/lib/python3.7/site-packages/Click-7.0.dist-info/

which holds the following files:

INSTALLER  LICENSE.txt  METADATA  RECORD  top_level.txt  WHEEL

I haven't a clue as to how to proceed! Never seen this before ...

Furthermore, google is offering me nothing conclusive.

Where to go from here!


--
Tim
tj49.com

--
https://mail.python.org/mailman/listinfo/python-list


Re: ModuleNotFoundError with click module

2019-12-01 Thread Tim Johnson



On 12/1/19 12:26 AM, Peter Otten wrote:

Tim Johnson wrote:


Using linux ubuntu 16.04 with bash shell.
Am retired python programmer, but not terribly current.
I have moderate bash experience.

When trying to install pgadmin4 via apt I get the following error
traceback when pgadmin4 is invoked:

Traceback (most recent call last):

snipped ...

File "/usr/local/lib/python3.7/site-packages/flask/cli.py", line 25, in

import click
ModuleNotFoundError: No module named 'click'


If I invoke python3 (/usr/local/bin/python3), version 3.7.2 and invoke
  >>> import click
click is imported successfully.

...
I'm too lazy to look into the details of your paths -- I'd just make sure
that click is installed with the same interpreter and user as pgadmin4, e.
g. globally

$ sudo /usr/local/bin/python3 -m pip install click
$ sudo /usr/local/bin/python3 path/to/setup.py install  # or whatever it
takes to install pgadmin4
Like I said, I'm not current. Yikes. Now I have 
/usr/local/lib/python3.7/site-packages/clic-0.1.3.dist-info/


After I have my coffee I will attempt to proceed from there with 
whatever it takes to finalize


thanks

--
Tim
tj49.com

--
https://mail.python.org/mailman/listinfo/python-list


Re: ModuleNotFoundError with click module

2019-12-01 Thread Peter Otten
Tim Johnson wrote:

> Using linux ubuntu 16.04 with bash shell.
> Am retired python programmer, but not terribly current.
> I have moderate bash experience.
> 
> When trying to install pgadmin4 via apt I get the following error
> traceback when pgadmin4 is invoked:
> 
> Traceback (most recent call last):
>  File "setup.py", line 17, in 
>  from pgadmin.model import db, User, Version, ServerGroup, Server, \
>  File "/usr/share/pgadmin4/web/pgadmin/__init__.py", line 19, in 
>  from flask import Flask, abort, request, current_app, session, url_for
>  File "/usr/local/lib/python3.7/site-packages/flask/__init__.py", line
> 21, in 
>  from .app import Flask
>  File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 34,
> in 
>  from . import cli
> File "/usr/local/lib/python3.7/site-packages/flask/cli.py", line 25, in
> 
> import click
> ModuleNotFoundError: No module named 'click'
> 
> 
> If I invoke python3 (/usr/local/bin/python3), version 3.7.2 and invoke
>  >>> import click
> click is imported successfully.
> 
> In this invocation, sys.path is:
> ['', '/usr/local/lib/python37.zip', '/usr/local/lib/python3.7',
> '/usr/local/lib/python3.7/lib-dynload',
> '/home/tim/.local/lib/python3.7/site-packages',
> '/usr/local/lib/python3.7/site-packages']
> 
> $PYTHONPATH is empty when the bash shell is invoked
> 
> $PATH as follows:
> 
/home/tim/bin:/home/tim/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
> 
> click.py can be found at
> /usr/local/lib/python3.7/site-packages/pipenv/patched/piptools/
> in turn click.py imports click, presumably as the package,
> which appears to be at
> /usr/local/lib/python3.7/site-packages/pipenv/vendor/click
> 
> Any number of settings of PYTHONPATH to the various paths above has
> failed to resolve the ModuleNotFoundError
> Same issues with attempting install from a virtual environment.
> 
> Any help will be appreciated.
> thanks
> tim
> 

I'm too lazy to look into the details of your paths -- I'd just make sure 
that click is installed with the same interpreter and user as pgadmin4, e. 
g. globally

$ sudo /usr/local/bin/python3 -m pip install click
$ sudo /usr/local/bin/python3 path/to/setup.py install  # or whatever it 
takes to install pgadmin4

or (better) in a virtual environment

$ /usr/local/bin/python3 -m venv whatever
$ cd whatever
$ . bin/activate
$ pip install click
$ python path/to/setup.py


-- 
https://mail.python.org/mailman/listinfo/python-list


ModuleNotFoundError with click module

2019-11-30 Thread Tim Johnson

Using linux ubuntu 16.04 with bash shell.
Am retired python programmer, but not terribly current.
I have moderate bash experience.

When trying to install pgadmin4 via apt I get the following error traceback
when pgadmin4 is invoked:

Traceback (most recent call last):
  File "setup.py", line 17, in 
    from pgadmin.model import db, User, Version, ServerGroup, Server, \
  File "/usr/share/pgadmin4/web/pgadmin/__init__.py", line 19, in 
    from flask import Flask, abort, request, current_app, session, url_for
  File "/usr/local/lib/python3.7/site-packages/flask/__init__.py", line 
21, in 

    from .app import Flask
  File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 34, 
in 

    from . import cli
File "/usr/local/lib/python3.7/site-packages/flask/cli.py", line 25, in 


import click
ModuleNotFoundError: No module named 'click'


If I invoke python3 (/usr/local/bin/python3), version 3.7.2 and invoke
>>> import click
click is imported successfully.

In this invocation, sys.path is:
['', '/usr/local/lib/python37.zip', '/usr/local/lib/python3.7',
'/usr/local/lib/python3.7/lib-dynload',
'/home/tim/.local/lib/python3.7/site-packages',
'/usr/local/lib/python3.7/site-packages']

$PYTHONPATH is empty when the bash shell is invoked

$PATH as follows:
/home/tim/bin:/home/tim/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

click.py can be found at 
/usr/local/lib/python3.7/site-packages/pipenv/patched/piptools/

in turn click.py imports click, presumably as the package,
which appears to be at 
/usr/local/lib/python3.7/site-packages/pipenv/vendor/click


Any number of settings of PYTHONPATH to the various paths above has 
failed to resolve the ModuleNotFoundError

Same issues with attempting install from a virtual environment.

Any help will be appreciated.
thanks
tim

--
https://mail.python.org/mailman/listinfo/python-list


Re: ModuleNotFoundError: No module named 'encodings'

2018-09-07 Thread Thomas Jollans
On 2018-09-07 17:13, Jason Qian via Python-list wrote:
> Thanks Thomas,
> 
> You are right, this seems the Python home configuration issue.
> 
> One more question.
> 
> Is there a way I can catch the error ( Fatal Python error: initfsencoding:
> ..) as exception in the c code ?

It's a fatal error, which means it aborts.

As I'm sure you know, C doesn't have exceptions. You might be able to
handle SIGABRT, I'm not sure.

> 
> try{
> Py_Initialize();
> }catch(xxx)
> {
> 
> }
> 
> 
> Thanks
> 
> 
> 
> On Thu, Sep 6, 2018 at 5:29 PM, Thomas Jollans  wrote:
> 
>> On 09/06/2018 09:46 PM, Jason Qian via Python-list wrote:
>>
>>> Hi
>>>
>>> Need some help.
>>>
>>> I have a C++ application that invokes Python.
>>>
>>> ...
>>> Py_SetPythonHome("python_path");
>>>
>>
>> This isn't actually a line in your code, is it? For one thing,
>> Py_SetPythonHome expects a wchar_t*...
>>
>> Py_Initialize();
>>>
>>> This works fine on Python 3.6.4 version, but got errors on Python 3.7.0
>>> when calling Py_Initialize(),
>>>
>>> Fatal Python error: initfsencoding: unable to load the file system codec
>>> ModuleNotFoundError: No module named 'encodings'
>>>
>>
>> So, Python can't find a core module. This either means your Python 3.7
>> build is broken, or it doesn't know where to look. Perhaps whatever it is
>> you're actually passing to Py_SetPythonHome needs to be changed to point to
>> the right place? (i.e. maybe you're giving it the location of the Python
>> 3.6 library rather than the Python 3.7 one)
>>
>> -- Thomas
>> --
>> https://mail.python.org/mailman/listinfo/python-list
>>

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: ModuleNotFoundError: No module named 'encodings'

2018-09-07 Thread Jason Qian via Python-list
Thanks Thomas,

You are right, this seems the Python home configuration issue.

One more question.

Is there a way I can catch the error ( Fatal Python error: initfsencoding:
..) as exception in the c code ?

try{
Py_Initialize();
}catch(xxx)
{

}


Thanks



On Thu, Sep 6, 2018 at 5:29 PM, Thomas Jollans  wrote:

> On 09/06/2018 09:46 PM, Jason Qian via Python-list wrote:
>
>> Hi
>>
>> Need some help.
>>
>> I have a C++ application that invokes Python.
>>
>> ...
>> Py_SetPythonHome("python_path");
>>
>
> This isn't actually a line in your code, is it? For one thing,
> Py_SetPythonHome expects a wchar_t*...
>
> Py_Initialize();
>>
>> This works fine on Python 3.6.4 version, but got errors on Python 3.7.0
>> when calling Py_Initialize(),
>>
>> Fatal Python error: initfsencoding: unable to load the file system codec
>> ModuleNotFoundError: No module named 'encodings'
>>
>
> So, Python can't find a core module. This either means your Python 3.7
> build is broken, or it doesn't know where to look. Perhaps whatever it is
> you're actually passing to Py_SetPythonHome needs to be changed to point to
> the right place? (i.e. maybe you're giving it the location of the Python
> 3.6 library rather than the Python 3.7 one)
>
> -- Thomas
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: ModuleNotFoundError: No module named 'encodings'

2018-09-06 Thread Thomas Jollans

On 09/06/2018 09:46 PM, Jason Qian via Python-list wrote:

Hi

Need some help.

I have a C++ application that invokes Python.

...
Py_SetPythonHome("python_path");


This isn't actually a line in your code, is it? For one thing, 
Py_SetPythonHome expects a wchar_t*...



Py_Initialize();

This works fine on Python 3.6.4 version, but got errors on Python 3.7.0
when calling Py_Initialize(),

Fatal Python error: initfsencoding: unable to load the file system codec
ModuleNotFoundError: No module named 'encodings'


So, Python can't find a core module. This either means your Python 3.7 
build is broken, or it doesn't know where to look. Perhaps whatever it 
is you're actually passing to Py_SetPythonHome needs to be changed to 
point to the right place? (i.e. maybe you're giving it the location of 
the Python 3.6 library rather than the Python 3.7 one)


-- Thomas
--
https://mail.python.org/mailman/listinfo/python-list


ModuleNotFoundError: No module named 'encodings'

2018-09-06 Thread Jason Qian via Python-list
Hi

Need some help.

I have a C++ application that invokes Python.

...
Py_SetPythonHome("python_path");
Py_Initialize();

This works fine on Python 3.6.4 version, but got errors on Python 3.7.0
when calling Py_Initialize(),

Fatal Python error: initfsencoding: unable to load the file system codec
ModuleNotFoundError: No module named 'encodings'


Thanks for the help
Jason
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: About: from sklearn import linear_model ModuleNotFoundError: No module named sklearn

2018-05-18 Thread jladasky
On Thursday, May 17, 2018 at 4:54:11 AM UTC-7, Jpn Jha wrote:
> Dear Team
> Please attached  Python_PyCharm  Interpreter doc and zoom it .
> 
> The screen shots are explanatory.

The Python mailing list is text-only.  Your screen shots were removed.

In general, please don't use screenshots when asking for programming assistance 
on the Internet.  Aside from the extra bandwidth that screen shots consume, it 
is also impossible for people who are trying to help you to cut and paste code 
from a screen shot.  Use text.
-- 
https://mail.python.org/mailman/listinfo/python-list


About: from sklearn import linear_model ModuleNotFoundError: No module named sklearn

2018-05-17 Thread Jpn Jha
Dear Team
Please attached  Python_PyCharm  Interpreter doc and zoom it .

The screen shots are explanatory.

Could you please  guide me step  wise  to resolve the Issue.
I am  completely new to Python.

Thanks
Regards

Jai Prakash
7975839735
-- 
https://mail.python.org/mailman/listinfo/python-list


Resolve ModuleNotFoundError: No module named 'wx'

2018-04-10 Thread srfpala
Running Win10 64-Bit and Pyscripter 3.3.2 Beta and/or VS 2017 with
Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 16:07:46) [MSC v.1900 32 bit 
(Intel)] on win32.
Interpreter sees import wx so will it attempt to find a specific file or 
reference to wx ?
Exactly what is the interpreter looking for?  
I thought an environment variable
D:\Python36\wxPython\site-packages  would resolve the issue  .. but I was wrong 
 !

Advice please 
-- 
https://mail.python.org/mailman/listinfo/python-list