Discussion:
[pyusb-users] Dual installation of Python in Raspberry Pi
Michel Allaire
2015-03-18 12:18:18 UTC
Permalink
Hi,



I want to use pyusb in a Raspberry pi which come with two installations of
Python: 2.x and 3.x.



The problem is that pyusb installs in a way that it is only working in
version 2.X and not in version 3.x in which I have the following error
message

"No module named core".



Is there a way to change the behavior of pyusb installer.



Or, if there is no registration process involved in this installation is it
sufficient to simply copy the pyusb files in the Python 3.x directory?



Thank you



Michel Allaire
Jim Easterbrook
2015-03-18 12:41:45 UTC
Permalink
Post by Michel Allaire
I want to use pyusb in a Raspberry pi which come with two installations
of Python: 2.x and 3.x.
The problem is that pyusb installs in a way that it is only working in
version 2.X and not in version 3.x in which I have the following error
message
“No module named core”.
Is there a way to change the behavior of pyusb installer.
How are you installing pyusb? If you use pip to install from PyPI you
just need to run the python3 version of pip: 'sudo pip3 install pyusb'
--
Jim Easterbrook <http://www.jim-easterbrook.me.uk/>
Michel Allaire
2015-03-18 19:37:12 UTC
Permalink
Thank you

I have installed pyusb with the following command as shown in the readme file of pyusb:

sudo python setup.py install

I am not familiar with the pip concept.

Regards

Michel




-----Message d'origine-----
De : Jim Easterbrook [mailto:***@jim-easterbrook.me.uk]
Envoyé : 18 mars 2015 08:42
À : pyusb-***@lists.sourceforge.net
Objet : Re: [pyusb-users] Dual installation of Python in Raspberry Pi
Post by Michel Allaire
I want to use pyusb in a Raspberry pi which come with two
installations of Python: 2.x and 3.x.
The problem is that pyusb installs in a way that it is only working
in version 2.X and not in version 3.x in which I have the following
error message
cd pi
Is there a way to change the behavior of pyusb installer.
How are you installing pyusb? If you use pip to install from PyPI you just need to run the python3 version of pip: 'sudo pip3 install pyusb'
--
Jim Easterbrook <http://www.jim-easterbrook.me.uk/>

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
pyusb-users mailing list
pyusb-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users
Steven Michalske
2015-03-18 19:44:35 UTC
Permalink
I strongly suggest you read up on pip and also you may want to look into virtualenv

Steve
Post by Michel Allaire
Thank you
sudo python setup.py install
I am not familiar with the pip concept.
Regards
Michel
-----Message d'origine-----
Envoyé : 18 mars 2015 08:42
Objet : Re: [pyusb-users] Dual installation of Python in Raspberry Pi
Post by Michel Allaire
I want to use pyusb in a Raspberry pi which come with two
installations of Python: 2.x and 3.x.
The problem is that pyusb installs in a way that it is only working
in version 2.X and not in version 3.x in which I have the following
error message
cd pi
Is there a way to change the behavior of pyusb installer.
How are you installing pyusb? If you use pip to install from PyPI you just need to run the python3 version of pip: 'sudo pip3 install pyusb'
--
Jim Easterbrook <http://www.jim-easterbrook.me.uk/>
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
pyusb-users mailing list
https://lists.sourceforge.net/lists/listinfo/pyusb-users
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
pyusb-users mailing list
https://lists.sourceforge.net/lists/listinfo/pyusb-users
Michel Allaire
2015-03-18 23:11:49 UTC
Permalink
Hi

I had a simple answer for Kevin Bullman

sudo python3 setup.py install

I am a retired engineer so I have time to learn.

So I am learning Raspberry Pi, Python and Linux. On top of that I can surely learn Pip

My best regards

Michel Allaire


-----Message d'origine-----
De : Steven Michalske [mailto:***@gmail.com]
Envoyé : 18 mars 2015 15:45
À : pyusb-***@lists.sourceforge.net
Objet : Re: [pyusb-users] Dual installation of Python in Raspberry Pi

I strongly suggest you read up on pip and also you may want to look into virtualenv

Steve
Post by Michel Allaire
Thank you
sudo python setup.py install
I am not familiar with the pip concept.
Regards
Michel
-----Message d'origine-----
Envoyé : 18 mars 2015 08:42
Objet : Re: [pyusb-users] Dual installation of Python in Raspberry Pi
Post by Michel Allaire
I want to use pyusb in a Raspberry pi which come with two
installations of Python: 2.x and 3.x.
The problem is that pyusb installs in a way that it is only working
in version 2.X and not in version 3.x in which I have the following
error message cd pi
Is there a way to change the behavior of pyusb installer.
How are you installing pyusb? If you use pip to install from PyPI you just need to run the python3 version of pip: 'sudo pip3 install pyusb'
--
Jim Easterbrook <http://www.jim-easterbrook.me.uk/>
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
pyusb-users mailing list
https://lists.sourceforge.net/lists/listinfo/pyusb-users
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
pyusb-users mailing list
https://lists.sourceforge.net/lists/listinfo/pyusb-users
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
pyusb-users mailing list
pyusb-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users

Kevin Bullmann
2015-03-18 20:29:46 UTC
Permalink
Hi,

Well if you want pyusb to be available in python3 you can just change
your command to:

sudo python3 setup.py install

Using pip is the better solution though. Pip is a package manager for
python and can download packages for you and can also do some dependency
resolution.
Parallel installations of python2 and python3 are actually the standard
in most linux distributions. Since python2 was considered the default
all commands related to python3 have the "3" attached to them. This is
also true for pip so that pip is the installation command for python2
and pip3 is the command for python3.

have fun

Kevin
Post by Michel Allaire
Thank you
sudo python setup.py install
I am not familiar with the pip concept.
Regards
Michel
-----Message d'origine-----
Envoyé : 18 mars 2015 08:42
Objet : Re: [pyusb-users] Dual installation of Python in Raspberry Pi
Post by Michel Allaire
I want to use pyusb in a Raspberry pi which come with two
installations of Python: 2.x and 3.x.
The problem is that pyusb installs in a way that it is only working
in version 2.X and not in version 3.x in which I have the following
error message
cd pi
Is there a way to change the behavior of pyusb installer.
How are you installing pyusb? If you use pip to install from PyPI you just need to run the python3 version of pip: 'sudo pip3 install pyusb'
Michel Allaire
2015-03-18 23:09:03 UTC
Permalink
Merci beaucoup.

It was so simple.

I am a retired engineer so I have time to learn.

So I am learning Raspberry Pi, Python and Linux. On top of that I can surely learn Pip

My best regards

Michel Allaire

-----Message d'origine-----
De : Kevin Bullmann [mailto:***@kbullmann.de]
Envoyé : 18 mars 2015 16:30
À : pyusb-***@lists.sourceforge.net
Objet : Re: [pyusb-users] Dual installation of Python in Raspberry Pi

Hi,

Well if you want pyusb to be available in python3 you can just change your command to:

sudo python3 setup.py install

Using pip is the better solution though. Pip is a package manager for python and can download packages for you and can also do some dependency resolution.
Parallel installations of python2 and python3 are actually the standard in most linux distributions. Since python2 was considered the default all commands related to python3 have the "3" attached to them. This is also true for pip so that pip is the installation command for python2 and pip3 is the command for python3.

have fun

Kevin
Post by Michel Allaire
Thank you
sudo python setup.py install
I am not familiar with the pip concept.
Regards
Michel
-----Message d'origine-----
Envoyé : 18 mars 2015 08:42
Objet : Re: [pyusb-users] Dual installation of Python in Raspberry Pi
Post by Michel Allaire
I want to use pyusb in a Raspberry pi which come with two
installations of Python: 2.x and 3.x.
The problem is that pyusb installs in a way that it is only working
in version 2.X and not in version 3.x in which I have the following
error message cd pi Is there a way to change the behavior of pyusb
installer.
How are you installing pyusb? If you use pip to install from PyPI you just need to run the python3 version of pip: 'sudo pip3 install pyusb'
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
pyusb-users mailing list
pyusb-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users
Loading...