If you're installing modules with pip, install pip3 and install the appropriate modules using pip3 instead of using regular pip. On Dec 24, 2015 12:12 AM, "Alex Kleider" <aklei...@sonic.net> wrote:
> On 2015-12-23 14:58, Jim Byrnes wrote: > >> I am in the process of moving from unbutu 12.04 to 14.04. I was doing >> some testing and got this: >> >> jfb@Jims-1404:~$ cd MyProgs >> jfb@Jims-1404:~/MyProgs$ cd passwords >> jfb@Jims-1404:~/MyProgs/passwords$ python3 passwords.py >> Traceback (most recent call last): >> File "passwords.py", line 8, in <module> >> from PythonCard import model,clipboard >> ImportError: No module named 'PythonCard' >> >> If I simply start it with python passwords.py it runs fine. There is >> no need to use python 3 on this particular program but if I wanted to >> write for python 3 in the future what do I need to do to run programs >> with it? >> >> Thanks, Jim >> > > Jim, make > > #!/usr/bin/env python3 > > the very first line in your myscript.py file > and change it's permissions with the following command: > > chmod 775 myscript.py > > Then you'll be able to run it simply by entering > > ./password.py > > on the command line. > > PS I don't think this will fix your current problem which is > probably the result of importing something that exists with > Python 2 but not 3- specifically PythonCard. > > _______________________________________________ > Tutor maillist - Tutor@python.org > To unsubscribe or change subscription options: > https://mail.python.org/mailman/listinfo/tutor > _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor