Mar 20, 2017 - python sdk /installer/vboxapisetup.py install. Export VBOXINSTALLPATH=$( which virtualbox). Sudo -E python vboxapisetup.py install.
I'm newbie of python programming.I have windows 7 laptop and I'm also running virtual box Ubuntu. I manually installed python3.5 on Win7 through Eclipse first. The default python version in my Virtualbox Ubuntu is 2.7.11. Is it possible for me to install python packages through my VirtualBox to my Win7 python3.5?
Will it bring any problem with multiple versions of python.
3 Answers
python 3.5 packages do not work with python 2.7 and vice versa.And I even think that you can't install packages from linux to windows.
The Ubuntu VirtualBox is not just a linux-looking frontend to your existing Win7 install. It's a completely separate OS that runs as if it were on a separate computer. You can set up shared folders to share data between the host and guest, but trying to use Linux to install programs on Windows would be error-prone and risky even if you could do it.
If you plan to be using Python on Windows, you'll need to install the packages on Windows, and a Linux VirtualBox isn't going to help you with that at all. If you're uncomfortable with the Windows command line, read up on some tutorials. There are also some alternative Windows shells that provide some advantages over the built-in CMD.
If you'd rather work on Linux, you can do that, but you'd want to do it entirely inside the VirtualBox. Inside Linux, you could install the version of Python you want, install the packages you want, and use whatever dev tools you want, as if you were working on a Linux computer. (Although in this case I have to wonder why you aren't actually using a Linux computer instead of a Windows one.)
I think what you wish to accomplish is to have a same version Python across both machine.
Best way is to go about doing it is to either install Python 2.7.x on Windows 7 or upgrade python 2.7.x on your Ubuntu to Python 3.5.x. Neither is good or bad.
To upgrade your Python 2.7.x to 3.x.x on your ubuntu machine,follow the instructions here.
If you wish to wish to install Python 2.7.x on your Windows,simply download the compatible exe from official page .It will create a folder under c:
e.g. C:Python27
.Thereafter,add the python path to environment variable PATH.
As for installing packages,the command remains the same across both OS.
Usually packages have dedicated versions for different python versions.pip install
will automatically resolve versions and install the compatible package version.
Not the answer you're looking for? Browse other questions tagged python or ask your own question.
I need to spawn/kill virtual box machines using python3.
There is a module called pyvbox
, but it does not work because the vboxapi
package is incompatible with python3.
If I try to import vboxapi
:
There is a package in /usr/lib/python2.7/dist-packages/vboxapi
, but it is incompatible with python3, for instance because of
Is there a way to use vboxapi with python3, which is the default python version on Ubuntu 16.06, or do I have to write such a package on my own?
(Optional) What is xpcom
?
I run on Linux Iwillnottellyoumyhostname 4.4.0-38-generic #57-Ubuntu SMP Tue Sep 6 15:42:33 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
.
1 Answer
There is a way to use vboxapi with python3. You can use this: vboxapi-py3