RE: Python Import Impossibility

2018-04-21 Thread 森平 直樹
Dennis,



Thank you very much !

Based on your suggestion, I uninstalled Anaconda and tried installing openpyxl 
again.

After that, I finally found that it was installed correctly.

(I confirmed that ‘import openpyxl’ has no error message. )



I deeply appreciate your cooperation.



Best Regards,

-
Naoki Morihira
TEL: 01181-90-6460-6265
-




差出人: Python-list  が 
Dennis Lee Bieber  の代理で送信
送信日時: Saturday, April 21, 2018 5:02:15 PM
宛先: python-list@python.org
件名: Re: Python Import Impossibility

On Sat, 21 Apr 2018 04:46:49 +, ?? ?? 
declaimed the following:


>
>Python 3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:04:45) [MSC v.1900 32 bit 
>(Intel)] on win32
>
>Type "help", "copyright", "credits" or "license" for more information.
>
>>>> import sys
>
>  File "", line 1
>
>print sys.path
>
>^
>
>
>
>SyntaxError: Missing parentheses in call to 'print'. Did you mean 
>print(sys.path)?
>
My default Python is 2.7 -- "print" was a language statement, whereas
3.x made it a function.

>['',
>
>'C:\\Users\\N.Morihira\\AppData\\Local\\Programs\\Python\\Python36-32\\python36.zip',
> 'C:\\Users\\N.Morihira\\AppData\\Local\\Programs\\Python\\Python36-32\\DLLs?,
>
>'C:\\Users\\N.Morihira\\AppData\\Local\\Programs\\Python\\Python36-32\\lib', 
>'C:\\Users\\N.Morihira\\AppData\\Local\\Programs\\Python\\Python36-32', 
>'C:\\Users\\N.Morihira\\AppData\\Local\\Programs\\Python\\Python36-32\\lib\\site-packages']
>

Note that you are NOT RUNNING the "Anaconda" installation there...
yet...


>>?C:Users/N.Morihira>py -m install openpyxl?,
>>
>>But the following message was displayed
>>
>>  *   Requirement already satisfied: openpyxl in 
>> c:\users\n.morihira\anaconda3\lib\site-packages
>>  *   Requirement already satisfied: jdcal in 
>> c:\users\n.morihira\anaconda3\lib\site-packages (from openpyxl)
>>  *   Requirement already satisfied: et_xmlfile in 
>> c:\users\n.morihira\anaconda3\lib\site-packages (from openpyxl),
>>

... this command IS running the "Anaconda" installation.


You appear to have TWO Python installations -- both configured for
user-only mode. And somehow "py" accesses one, while "python" accesses the
other.



--
Wulfraed Dennis Lee Bieber AF6VN
wlfr...@ix.netcom.comHTTP://wlfraed.home.netcom.com/

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


RE: Python Import Impossibility

2018-04-21 Thread 森平 直樹
Dennis,

Could you tell me how to set the path for working derectory in Python ?

Best Regards,
-
Naoki Morihira
TEL: 01181-90-6460-6265
-


差出人: 森平 直樹 
送信日時: Saturday, April 21, 2018 7:57:23 PM
宛先: Dennis Lee Bieber; python-list@python.org
件名: RE: Python Import Impossibility


Dennis,



Thank you very much !

Based on your suggestion, I uninstalled Anaconda and tried installing openpyxl 
again.

After that, I finally found that it was installed correctly.

(I confirmed that ‘import openpyxl’ has no error message. )



I deeply appreciate your cooperation.



Best Regards,

-
Naoki Morihira
TEL: 01181-90-6460-6265
-




差出人: Python-list  が 
Dennis Lee Bieber  の代理で送信
送信日時: Saturday, April 21, 2018 5:02:15 PM
宛先: python-list@python.org
件名: Re: Python Import Impossibility

On Sat, 21 Apr 2018 04:46:49 +, ?? ?? 
declaimed the following:


>
>Python 3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:04:45) [MSC v.1900 32 bit 
>(Intel)] on win32
>
>Type "help", "copyright", "credits" or "license" for more information.
>
>>>> import sys
>
>  File "", line 1
>
>print sys.path
>
>^
>
>
>
>SyntaxError: Missing parentheses in call to 'print'. Did you mean 
>print(sys.path)?
>
My default Python is 2.7 -- "print" was a language statement, whereas
3.x made it a function.

>['',
>
>'C:\\Users\\N.Morihira\\AppData\\Local\\Programs\\Python\\Python36-32\\python36.zip',
> 'C:\\Users\\N.Morihira\\AppData\\Local\\Programs\\Python\\Python36-32\\DLLs?,
>
>'C:\\Users\\N.Morihira\\AppData\\Local\\Programs\\Python\\Python36-32\\lib', 
>'C:\\Users\\N.Morihira\\AppData\\Local\\Programs\\Python\\Python36-32', 
>'C:\\Users\\N.Morihira\\AppData\\Local\\Programs\\Python\\Python36-32\\lib\\site-packages']
>

Note that you are NOT RUNNING the "Anaconda" installation there...
yet...


>>?C:Users/N.Morihira>py -m install openpyxl?,
>>
>>But the following message was displayed
>>
>>  *   Requirement already satisfied: openpyxl in 
>> c:\users\n.morihira\anaconda3\lib\site-packages
>>  *   Requirement already satisfied: jdcal in 
>> c:\users\n.morihira\anaconda3\lib\site-packages (from openpyxl)
>>  *   Requirement already satisfied: et_xmlfile in 
>> c:\users\n.morihira\anaconda3\lib\site-packages (from openpyxl),
>>

... this command IS running the "Anaconda" installation.


You appear to have TWO Python installations -- both configured for
user-only mode. And somehow "py" accesses one, while "python" accesses the
other.



--
Wulfraed Dennis Lee Bieber AF6VN
wlfr...@ix.netcom.comHTTP://wlfraed.home.netcom.com/

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


RE: Python Import Impossibility

2018-04-21 Thread 森平 直樹
Dennis,



Thank you for your response.

The following is the results of what you pointed oit.

Could you find out how to cope with this situation ?



-=-=-=-
Microsoft Windows [Version 10.0.16299.371]

(c) 2017 Microsoft Corporation. All rights reserved.



C:\Users\N.Morihira>echo %path%

C:\Users\N.Morihira\AppData\Local\Programs\Python\Python36-32\Scripts\;

C:\Users\N.Morihira\AppData\Local\Programs\Python\Python36-32\;




C:\Users\N.Morihira>python

Python 3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:04:45) [MSC v.1900 32 bit 
(Intel)] on win32

Type "help", "copyright", "credits" or "license" for more information.

>>> import sys

  File "", line 1

print sys.path

^



SyntaxError: Missing parentheses in call to 'print'. Did you mean 
print(sys.path)?

['',

'C:\\Users\\N.Morihira\\AppData\\Local\\Programs\\Python\\Python36-32\\python36.zip',
 'C:\\Users\\N.Morihira\\AppData\\Local\\Programs\\Python\\Python36-32\\DLLs’,

'C:\\Users\\N.Morihira\\AppData\\Local\\Programs\\Python\\Python36-32\\lib', 
'C:\\Users\\N.Morihira\\AppData\\Local\\Programs\\Python\\Python36-32', 
'C:\\Users\\N.Morihira\\AppData\\Local\\Programs\\Python\\Python36-32\\lib\\site-packages']

>>>

-=-=-=-


Best Regards,

-
Naoki Morihira
TEL: 01181-90-6460-6265
-



____________
差出人: Python-list  が 
Dennis Lee Bieber  の代理で送信
送信日時: Wednesday, April 18, 2018 8:12:36 AM
宛先: python-list@python.org
件名: Re: Python Import Impossibility

On Tue, 17 Apr 2018 14:08:49 +, ?? ?? 
declaimed the following:

>
>
>I deleted ?C:\Python27?, and executed in Windows Command prompt screen,

But did you UNINSTALL it? If you didn't, there may be remnants left in
the registry...


>
>?C:Users/N.Morihira>py -m install openpyxl?,
>
>But the following message was displayed
>
>  *   Requirement already satisfied: openpyxl in 
> c:\users\n.morihira\anaconda3\lib\site-packages
>  *   Requirement already satisfied: jdcal in 
> c:\users\n.morihira\anaconda3\lib\site-packages (from openpyxl)
>  *   Requirement already satisfied: et_xmlfile in 
> c:\users\n.morihira\anaconda3\lib\site-packages (from openpyxl),
>


>
>And it also displays the following message in Python3.6.4 Shell screen.
>>>> import openpyxl
>
>Traceback (most recent call last):
>
>  File "", line 1, in 
>

That (pyshell#3) seems to imply you are using some third-party program
as your "shell"... A direct OS shell would report .

What do you get if you open a proper OS command-line shell and type
"python" -- as in

-=-=-=-
Microsoft Windows [Version 10.0.16299.371]
(c) 2017 Microsoft Corporation. All rights reserved.

C:\Users\Wulfraed>echo %path%
C:\Python27\;C:\Python27\Scripts\;C:\Python27\Tools\scripts\;C:\WINDOWS\system32;C:\WINDOWS;




C:\Users\Wulfraed>

C:\Users\Wulfraed>python
ActivePython 2.7.13.2716 (ActiveState Software Inc.) based on
Python 2.7.13 (default, Jun 26 2017, 14:28:43) [MSC v.1500 64 bit (AMD64)]
on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> print sys.path
['', 'C:\\Python27\\python27.zip', 'C:\\Python27\\DLLs',
'C:\\Python27\\lib', 'C:\\Python27\\lib\\plat-win',
'C:\\Python27\\lib\\lib-tk', 'C:\\Python27',
'C:\\Python27\\lib\\site-packages',
'C:\\Python27\\lib\\site-packages\\win32',
'C:\\Python27\\lib\\site-packages\\win32\\lib',
'C:\\Python27\\lib\\site-packages\\Pythonwin']
>>>
-=-=-=-

{Yes, I'm configured to use Python 2.7 as the default, and that is the
version on my system (not Python) PATH -- it is also not installed as a
single-user application}


--
Wulfraed Dennis Lee Bieber AF6VN
wlfr...@ix.netcom.comHTTP://wlfraed.home.netcom.com/

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


RE: Python Import Impossibility

2018-04-17 Thread 森平 直樹
Thomas,



I deleted ‘C:\Python27’, and executed in Windows Command prompt screen,

‘C:Users/N.Morihira>py -m install openpyxl’,

But the following message was displayed

  *   Requirement already satisfied: openpyxl in 
c:\users\n.morihira\anaconda3\lib\site-packages
  *   Requirement already satisfied: jdcal in 
c:\users\n.morihira\anaconda3\lib\site-packages (from openpyxl)
  *   Requirement already satisfied: et_xmlfile in 
c:\users\n.morihira\anaconda3\lib\site-packages (from openpyxl),



And it also displays the following message in Python3.6.4 Shell screen.
>>> import openpyxl

Traceback (most recent call last):

  File "", line 1, in 

import openpyxl

ModuleNotFoundError: No module named 'openpyxl'



Best Regards,

-
Naoki Morihira
TEL: 01181-90-6460-6265
-




差出人: Python-list  が 
Thomas Jollans  の代理で送信
送信日時: Tuesday, April 17, 2018 1:12:48 AM
宛先: python-list@python.org
件名: Re: Python Import Impossibility

On 2018-04-17 08:35, 森平 直樹 wrote:
> I installed by typing ‘py -m pip install openpyxl’.
>
>
>
> In my PC, python is installed in the following folder:
>
> C:\Users\N.Morihira\AppData\Local\Programs\Python\Python36-32
>
> But old version is left in the following folder:
>
> C:\Python27
>


There you go. py.exe probably used Python 2.7 rather than Python 3.6.
What Python version starts if you just run "py"?

If it *is* Python 2.7 that's the default, you can use "py -3 -m pip" etc.

Or, frankly, if you don't use Python 2.7, you might as well just
uninstall it to save you the headaches.

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


RE: Python Import Impossibility

2018-04-17 Thread 森平 直樹
Thomas,



I installed by typing the following command in the MS-Windows command prompt 
screen.

‘py -m pip install openpyxl’.



Best Regards,

-
Naoki Morihira
TEL: 01181-90-6460-6265
-




差出人: Python-list  が 
Thomas Jollans  の代理で送信
送信日時: Friday, April 13, 2018 9:38:15 AM
宛先: python-list@python.org
件名: Re: Python Import Impossibility

On 13/04/18 14:48, ?? ?? wrote:
> Hello,
>
> Could you tell me how to import the installed modules ?
>
> I have successfully installed openpyxl, but
> When I executed ‘import openpyxl’,
> The following message is displayed:
> Traceback (most recent call last):
>   File "", line 1, in 
> import openpyxl
> ModuleNotFoundError: No module named 'openpyxl'
>
> My folder is formed as follows:
> [cid:image003.png@01D3D312.38C82830]

Is it possible that you installed the module in the wrong Python
installation?
--
https://mail.python.org/mailman/listinfo/python-list
-- 
https://mail.python.org/mailman/listinfo/python-list


RE: Python Import Impossibility

2018-04-17 Thread 森平 直樹
Steven,



When I installed ‘openpyxl’, there is no error message in the command prompt 
screen. So I think that my installation is successfully completed.



I installed by typing ‘py -m install openpyxl’.



In my PC, python is installed in the following folder:

C:\Users\N.Morihira\AppData\Local\Programs\Python\Python36-32\DLLs

C:\Users\N.Morihira\AppData\Local\Programs\Python\Python36-32\Doc

C:\Users\N.Morihira\AppData\Local\Programs\Python\Python36-32\include

C:\Users\N.Morihira\AppData\Local\Programs\Python\Python36-32\Lib

C:\Users\N.Morihira\AppData\Local\Programs\Python\Python36-32\libs

C:\Users\N.Morihira\AppData\Local\Programs\Python\Python36-32\Scripts

C:\Users\N.Morihira\AppData\Local\Programs\Python\Python36-32\tcl

C:\Users\N.Morihira\AppData\Local\Programs\Python\Python36-32\Tools



But old version is left in the following folder:

C:\Python27\Lib\site-packages

C:\Python27\Scripts



Best Regards,

-
Naoki Morihira
TEL: 01181-90-6460-6265
-




差出人: Python-list  が 
Steven D'Aprano  の代理で送信
送信日時: Friday, April 13, 2018 9:48:55 AM
宛先: python-list@python.org
件名: Re: Python Import Impossibility

On Fri, 13 Apr 2018 12:48:55 +, ?? ?? wrote:

> Hello,
>
> Could you tell me how to import the installed modules ?
>
> I have successfully installed openpyxl,

How do you know it was successful?

What did you do to install it?

How many different Python installations do you have on your system?



but When I executed ‘import
> openpyxl’, The following message is displayed:
> Traceback (most recent call last):
>   File "", line 1, in 
> import openpyxl
> ModuleNotFoundError: No module named 'openpyxl'
>
> My folder is formed as follows:
> [cid:image003.png@01D3D312.38C82830]

There are no attachments permitted on this list.




--
Steve

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


Re: Python Import Impossibility

2018-04-17 Thread Thomas Jollans
On 2018-04-17 08:35, 森平 直樹 wrote:
> I installed by typing ‘py -m pip install openpyxl’.
> 
> 
> 
> In my PC, python is installed in the following folder:
> 
> C:\Users\N.Morihira\AppData\Local\Programs\Python\Python36-32
> 
> But old version is left in the following folder:
> 
> C:\Python27
> 


There you go. py.exe probably used Python 2.7 rather than Python 3.6.
What Python version starts if you just run "py"?

If it *is* Python 2.7 that's the default, you can use "py -3 -m pip" etc.

Or, frankly, if you don't use Python 2.7, you might as well just
uninstall it to save you the headaches.

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


RE: Python Import Impossibility

2018-04-16 Thread 森平 直樹
Steven,

I would like to modify then following:
(Error) ‘py -m install openpyxl’
(Correct)  ‘py -m pip install openpyxl’

Sorry for my carelessness.

Best Regards,
-
Naoki Morihira
TEL: 01181-90-6460-6265
-

差出人: 森平 直樹<mailto:naoki_morih...@outlook.jp>
送信日時: 2018年4月16日 23:28
宛先: Steven D'Aprano<mailto:steve+comp.lang.pyt...@pearwood.info>; 
python-list@python.org<mailto:python-list@python.org>
件名: RE: Python Import Impossibility


Steven,



When I installed ‘openpyxl’, there is no error message in the command prompt 
screen. So I think that my installation is successfully completed.



I installed by typing ‘py -m pip install openpyxl’.



In my PC, python is installed in the following folder:

C:\Users\N.Morihira\AppData\Local\Programs\Python\Python36-32\DLLs

C:\Users\N.Morihira\AppData\Local\Programs\Python\Python36-32\Doc

C:\Users\N.Morihira\AppData\Local\Programs\Python\Python36-32\include

C:\Users\N.Morihira\AppData\Local\Programs\Python\Python36-32\Lib

C:\Users\N.Morihira\AppData\Local\Programs\Python\Python36-32\libs

C:\Users\N.Morihira\AppData\Local\Programs\Python\Python36-32\Scripts

C:\Users\N.Morihira\AppData\Local\Programs\Python\Python36-32\tcl

C:\Users\N.Morihira\AppData\Local\Programs\Python\Python36-32\Tools



But old version is left in the following folder:

C:\Python27\Lib\site-packages

C:\Python27\Scripts



Best Regards,

-
Naoki Morihira
TEL: 01181-90-6460-6265
-



差出人: Python-list  が 
Steven D'Aprano  の代理で送信
送信日時: Friday, April 13, 2018 9:48:55 AM
宛先: python-list@python.org
件名: Re: Python Import Impossibility

On Fri, 13 Apr 2018 12:48:55 +, ?? ?? wrote:

> Hello,
>
> Could you tell me how to import the installed modules ?
>
> I have successfully installed openpyxl,

How do you know it was successful?

What did you do to install it?

How many different Python installations do you have on your system?



but When I executed ‘import
> openpyxl’, The following message is displayed:
> Traceback (most recent call last):
>   File "", line 1, in 
> import openpyxl
> ModuleNotFoundError: No module named 'openpyxl'
>
> My folder is formed as follows:
> [cid:image003.png@01D3D312.38C82830]

There are no attachments permitted on this list.




--
Steve

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

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


Re: Python Import Impossibility

2018-04-13 Thread Steven D'Aprano
On Fri, 13 Apr 2018 12:48:55 +, ?? ?? wrote:

> Hello,
> 
> Could you tell me how to import the installed modules ?
> 
> I have successfully installed openpyxl, 

How do you know it was successful?

What did you do to install it?

How many different Python installations do you have on your system?



but When I executed ‘import
> openpyxl’, The following message is displayed:
> Traceback (most recent call last):
>   File "", line 1, in 
> import openpyxl
> ModuleNotFoundError: No module named 'openpyxl'
> 
> My folder is formed as follows:
> [cid:image003.png@01D3D312.38C82830]

There are no attachments permitted on this list.




-- 
Steve

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


Re: Python Import Impossibility

2018-04-13 Thread Thomas Jollans
On 13/04/18 14:48, ?? ?? wrote:
> Hello,
> 
> Could you tell me how to import the installed modules ?
> 
> I have successfully installed openpyxl, but
> When I executed ‘import openpyxl’,
> The following message is displayed:
> Traceback (most recent call last):
>   File "", line 1, in 
> import openpyxl
> ModuleNotFoundError: No module named 'openpyxl'
> 
> My folder is formed as follows:
> [cid:image003.png@01D3D312.38C82830]

Is it possible that you installed the module in the wrong Python
installation?
-- 
https://mail.python.org/mailman/listinfo/python-list