ERROR in loading data

2020-02-04 Thread laiba . zubair96
#load the training and testing data, then scale it into the
# range [0, 1]
print("[INFO] loading  ADNI data...")
((trainX, trainY), (testX, testY)) = '/content/gdrive/My 
Drive/3_Classes/'.loads_data()
trainX = trainX.astype("float") / 255.0
testX = testX.astype("float") / 255.0
 
# initialize the label names for the  ADNI dataset
labelNames = ["outAD", "outCN", "outMCI"]
When i try to run this code I got the following error.

[INFO] loading  ADNI data...
---
AttributeErrorTraceback (most recent call last)
 in ()
  1 print("[INFO] loading  ADNI data...")
> 2 ((trainX, trainY), (testX, testY)) = '/content/gdrive/My 
Drive/3_Classes/'.loads_data()
  3 trainX = trainX.astype("float") / 255.0
  4 testX = testX.astype("float") / 255.0
  5 
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: ERROR in loading data

2020-02-04 Thread Rhodri James

On 04/02/2020 14:49, [email protected] wrote:

#load the training and testing data, then scale it into the
# range [0, 1]
print("[INFO] loading  ADNI data...")
((trainX, trainY), (testX, testY)) = '/content/gdrive/My 
Drive/3_Classes/'.loads_data()
trainX = trainX.astype("float") / 255.0
testX = testX.astype("float") / 255.0
  
	# initialize the label names for the  ADNI dataset

labelNames = ["outAD", "outCN", "outMCI"]
When i try to run this code I got the following error.

[INFO] loading  ADNI data...
---
AttributeErrorTraceback (most recent call last)
 in ()
   1 print("[INFO] loading  ADNI data...")
> 2 ((trainX, trainY), (testX, testY)) = '/content/gdrive/My 
Drive/3_Classes/'.loads_data()
   3 trainX = trainX.astype("float") / 255.0
   4 testX = testX.astype("float") / 255.0
   5


So that error is saying that something on line 2 is trying to use an 
attribute incorrectly, probably one that doesn't exist (there really 
should be more explanatory information in the error, by the way).  The 
only thing on line 2 that tries to access an attribute is the string 
'/content/gdrive/My Drive/3_Classes/', which tries to run the method 
loads_data().  Fair enough.  A quick test on the interactive command 
line or a look in the documents will tell you that strings indeed do not 
have a loads_data() method.


I don't know what library you are intending to use, but you need to open 
your file with that first.


--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list


Re: ERROR in loading data

2020-02-04 Thread Joel Goldstick
On Tue, Feb 4, 2020 at 9:51 AM  wrote:
>
> #load the training and testing data, then scale it into the
> # range [0, 1]
> print("[INFO] loading  ADNI data...")
> ((trainX, trainY), (testX, testY)) = '/content/gdrive/My 
> Drive/3_Classes/'.loads_data()

What is the class of the .loads)data() method?  I don't think it is a
string representing a file path.  Look in the docs for .loads_data()
to see what you are doing wrong.  That looks like it might be a numpy
> trainX = trainX.astype("float") / 255.0
> testX = testX.astype("float") / 255.0
>
> # initialize the label names for the  ADNI dataset
> labelNames = ["outAD", "outCN", "outMCI"]
> When i try to run this code I got the following error.
>
> [INFO] loading  ADNI data...
> ---
> AttributeErrorTraceback (most recent call last)
>  in ()
>   1 print("[INFO] loading  ADNI data...")
> > 2 ((trainX, trainY), (testX, testY)) = '/content/gdrive/My 
> Drive/3_Classes/'.loads_data()
>   3 trainX = trainX.astype("float") / 255.0
>   4 testX = testX.astype("float") / 255.0
>   5
> --
> https://mail.python.org/mailman/listinfo/python-list



-- 
Joel Goldstick
http://joelgoldstick.com/blog
http://cc-baseballstats.info/stats/birthdays
-- 
https://mail.python.org/mailman/listinfo/python-list


How to instlal pyodbc, without pip

2020-02-04 Thread dcwhatthe
Hi,

Pip won't work on my desktop, because of the firewalls we have set up.

I have the version from github.  Assuming my Python 3.8.1 Home Directory is 
C:\Python, How can I install pyodbc pyodbc-master.zip?  Which folders should I 
unzip it into?



Regards,




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


Re: How to instlal pyodbc, without pip

2020-02-04 Thread DL Neil via Python-list



On 5/02/20 6:34 AM, [email protected] wrote:

Pip won't work on my desktop, because of the firewalls we have set up.

I have the version from github.  Assuming my Python 3.8.1 Home Directory is 
C:\Python, How can I install pyodbc pyodbc-master.zip?  Which folders should I 
unzip it into?



I don't use MS-Win. My personal library directory is 
/home/dn/.local/lib/python3.7/site-packages. There is an equivalent of 
such, for you.


Pip is a convenience. Manual installation is perfectly reasonable.


For wider understanding and to take advantage of Python's flexibility to 
include the limitations of your situation, the following might help:


Python Setup and Usage
https://docs.python.org/3/using/index.html

Installing Python Modules
https://docs.python.org/3/installing/index.html

Installing Packages
https://packaging.python.org/tutorials/installing-packages/#installing-to-the-user-site

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


Re: How to instlal pyodbc, without pip

2020-02-04 Thread Terry Reedy

On 2/4/2020 12:34 PM, [email protected] wrote:


Pip won't work on my desktop, because of the firewalls we have set up.

I have the version from github.  Assuming my Python 3.8.1 Home Directory is 
C:\Python, How can I install pyodbc pyodbc-master.zip?


If you have dependencies installed, you should be able to pip install 
with a command line arg telling it to use that file.  Can you run pip -h?

 >  Which folders should I unzip it into?

The pyodbc package must end up in .../Lib/site-packages.  Unzipping 
there might work, or maybe not.  The zipped manifest.ini and setup.py 
and maybe other files have the installation details, which pip reads and 
interprets.


--
Terry Jan Reedy

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


Re: How to instlal pyodbc, without pip

2020-02-04 Thread Souvik Dutta
You might use chocolatey if you like.

On Tue, 4 Feb, 2020, 11:05 pm ,  wrote:

> Hi,
>
> Pip won't work on my desktop, because of the firewalls we have set up.
>
> I have the version from github.  Assuming my Python 3.8.1 Home Directory
> is C:\Python, How can I install pyodbc pyodbc-master.zip?  Which folders
> should I unzip it into?
>
>
>
> Regards,
>
>
>
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


How to make a cross platform python app with pyinstaller??

2020-02-04 Thread Souvik Dutta
Hi,
I made a python gui with pyqt5 and packed it with pyinstaller. It is
running well in my computer but when I gave it to a friend who doesn't have
any python version installed and it didn't run. The message was "This app
cannot be run on your pc.". How can I solve this???
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: How to make a cross platform python app with pyinstaller??

2020-02-04 Thread Chris Angelico
On Wed, Feb 5, 2020 at 2:32 PM Souvik Dutta  wrote:
>
> Hi,
> I made a python gui with pyqt5 and packed it with pyinstaller. It is
> running well in my computer but when I gave it to a friend who doesn't have
> any python version installed and it didn't run. The message was "This app
> cannot be run on your pc.". How can I solve this???

Distribute the .py file instead. It can then run on any computer with
Python installed.

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


Re: How to make a cross platform python app with pyinstaller??

2020-02-04 Thread Michael Torrie
On 2/4/20 8:33 PM, Chris Angelico wrote:
> On Wed, Feb 5, 2020 at 2:32 PM Souvik Dutta  wrote:
>>
>> Hi,
>> I made a python gui with pyqt5 and packed it with pyinstaller. It is
>> running well in my computer but when I gave it to a friend who doesn't have
>> any python version installed and it didn't run. The message was "This app
>> cannot be run on your pc.". How can I solve this???
> 
> Distribute the .py file instead. It can then run on any computer with
> Python installed.

And PyQt5 installed of course.  And Qt5.  None of which is likely to be
a commonly installed software package.  Asking someone to install Python
separately to run your app is a tall order, to say nothing of PyQt5.  So
while this answer is technically correct, the larger issue of
distributing Python programs remains.

Furthering Chris's answer a bit, there really is no way to simply
distribute a Python app and all its dependencies in any simple, portable
way.  If the dependencies already exist on the target system, then Chris
is absolutely right. You just give him the py file and he double-clicks
on it and it runs.  That may work some of the time.

The reality is that this is often insufficient.  Your best bet may be to
build an installer that either installs everything you need into a
Program Files directory, or also runs the Python, and PyQt5 installers
to install them system-wide before installing your app and your bundled
shortcuts and program launcher.  Building installers isn't too awful
using a number of free tools, but it's an entire programming domain in
and of itself.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: How to make a cross platform python app with pyinstaller??

2020-02-04 Thread Cameron Simpson

On 04Feb2020 21:27, Michael Torrie  wrote:

On 2/4/20 8:33 PM, Chris Angelico wrote:

On Wed, Feb 5, 2020 at 2:32 PM Souvik Dutta  wrote:

I made a python gui with pyqt5 and packed it with pyinstaller. It is
running well in my computer but when I gave it to a friend who doesn't have
any python version installed and it didn't run. The message was "This app
cannot be run on your pc.". How can I solve this???


Distribute the .py file instead. It can then run on any computer with
Python installed.


And PyQt5 installed of course.  And Qt5.  None of which is likely to be
a commonly installed software package.  Asking someone to install Python
separately to run your app is a tall order, to say nothing of PyQt5.  So
while this answer is technically correct, the larger issue of
distributing Python programs remains. [...]


The purpose of tools like py2installer is to build an app containing all 
the required dependencies. I've been using py2app for this myself, and 
confess to being rather ignorant about the internals.  However, it has 
problems; the Python executable itself is part of the problem.


MacOS apps at least have some funky library linking stuff which lets you 
derive the library locations from the app location, etc. However, I've 
had plenty of pain with this myself.


I'm contemplating not just including a virtualenv in the app but a whole 
python install.


Cheers,
Cameron Simpson 
--
https://mail.python.org/mailman/listinfo/python-list


Mauritius UG (pymug) 2019 End of Year Report

2020-02-04 Thread Abdur-Rahmaan Janhangeer
Greetings list,

Today our User Group published it's first ever end-of-year report:

https://www.pymug.com/assets/pymug_2019_report.pdf

Feel free to ask me anything!

Yours,

Abdur-Rahmaan Janhangeer
pythonmembers.club  | github

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


Re: How to make a cross platform python app with pyinstaller??

2020-02-04 Thread Abdur-Rahmaan Janhangeer
Use the Dev version of pyinstaller.

pip install https://github.com/pyinstaller/pyinstaller/archive/develop.zip

Yours,

Abdur-Rahmaan Janhangeer
pythonmembers.club  | github

Mauritius


On Wed, Feb 5, 2020 at 7:31 AM Souvik Dutta  wrote:

> Hi,
> I made a python gui with pyqt5 and packed it with pyinstaller. It is
> running well in my computer but when I gave it to a friend who doesn't have
> any python version installed and it didn't run. The message was "This app
> cannot be run on your pc.". How can I solve this???
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list