Im trying to install kivy in my portable python with this installer:
http://www.lfd.uci.edu/~gohlke/pythonlibs/#kivy
(Its a pre-compiled version of kivy)
When executing the file, it says "Python 2.7 version required", but since the python version im using is portable, I guess this is normal.
So my question is, is there a workarround to install a precompiled package in portable python? By somehow registering the portable python installation?
More (maybe innecesary) information:
My guess would be registering portable python in the system (Windows 7
64), but I already tried by changing the "path" enviroiment variable to point all
the required python paths without success.
I cant use the kivy modules to install it by compiling it on my computer because its too hard for me,(cython wont work, or then another of the 7 different modules will give me problems, untill i destroy my python installation. I already destroyed my
previous python installation while doing so, and had to reinstall
windows to get python working again -_-
Thats why I want to migrate
into portable python, but if this is not possible I will just go back
to normal python and install kivy on it...
The Kivy package on windows includes a portable python installation with Kivy installed.
Double click on the kivy.bat.
You will have a console have easy_install and pip available. Compiler is set to Mingw, and cython is already installed. Everything will be installed in the portable installation, not your system installation.
Enjoy :)
Note: if you want to see how we do, just edit the kivy.bat.
Related
Trying to install new packages via pip on Windows, but after it installs - Python cannot resolve the import. For Example, I have just installed the Python package similaritymeasures and pip correctly installed it, but when I import it into my Python program, it cannot find the import. Has anyone know a way around this?
Make sure that you restart VSCode after downloading your package. Sometimes, when you download a package while VSCode is still running, it doesn't recognize the package when using import similaritymeasures.
If that didn't work, then make sure that VSCode is using your preferred version of python. It is possible that you have more than one python version and it's using a non-compatible one to run your code. This can be done at the bottom right corner of the window by clicking the box that says: (for example) 3.9.5 64-bit. Then select a different (preferably older) version from the pop up widnow.
These are the solutions that came to my mind, I hope this helped.
I was trying to create Python executables on Windows 10 Pro (latest) so was upgrading to the latest packages but it's changed.
I've just gotten rid of Python 3.6 and reinstalled Python 3.9. I then went and installed PythonWin for it using the following (there no longer seems to be what was a standard install package):
**pip install pywin32**
Python is on the start menu but, unlike earlier installs, the new way of installing PythonWin this doesn't seem to give me any kind of way to run the program. Surely it should create some kind of shortcut on the start menu?
Any advice on this would be most helpful.
James
SOLVED!
While I still have no idea why a Start Menu shortcut wasn't installed, I have found the executable that runs PythonWin.
It was located in the following folder:
"C:\Users<MyUserID>\AppData\Local\Programs\Python\Python39\Lib\site-packages\pythonwin"
Thanks :)
I have both Python 3.7 and 2.7 installed currently, and have a simple image processing script that calls for opencv. However, I keep getting the "module not found" error. I've tried using pip install, pip3 install, and installing the Windows executable from the opencv website, none of which have fixed the problem. The script won't run from either 3.7 or 2.7! I'm currently trying to use Visual Studio Code on a Windows 10 Surface computer.
Other threads seem to suggest that I need to update the Python registry/pointer or something to reflect the actual install location, but I can't seem to find how to do this. Or can I simply copy/paste the directory or files into Python directly? (Python 3.7 is preferred, or for both if possible!)
Edit: After uninstalling and reinstalling both Python 2.7 and 3.7, I think I figured out what the problem was! I was still having issues upon reinstall, so I tried rolling back a version to 3.6. During this installation, I noticed that even pip wasn't working anymore. It was at this point I realized that somehow my installation of Python was done with administrative privileges by default. Even though my account is the only one running on my personal computer, I still had to install pip with elevated privileges to get it to work. Now it seems like OpenCV and other modules are working!
I am trying to convert a python script to an executable file.
I have tried cxFreeze and py2exe, but both told me that Python27 are not in the registry. I found several other questions that tell me to go to regedit and find the python folder, but it is not there. I tried going to HKEY_CURRENT_USER/Software and Python27 was not there.
Do I need to add it there to run the installer for cxFreeze or py2exe or is there another way?
Tools like PyInstaller package python scripts with the python run-time interpreter into standalone Windows applications. Installation of python (2.7.x) and all required python libraries is a prerequisite.
My suggestion is to install the latest Python 2.7 from this location: https://www.python.org/downloads/release/python-2710/. Make sure to choose the correct architecture, apparently 32-bit is the easiest to get working.
I fixed the issue. Apparently I accidentally installed 32-bit Python on a 64-bit machine. So I have to use the 32-bit installer because it installs the registry key in a different place. Thanks for the help anyways.
I want to install Python 2.7 in two places at once on my Windows machine. For example, one in c:\python27 and another in c:\myproduct\python27. The official installer refuses to let me do this. If there is already an installation when I run the installer, it prompts me and asks if I want to Change, Repair or Remove the existing installation.
The TARGETDIR trick mentioned elsewhere on Stackoverflow doesn't work either - I get the same result if I type the following into a cmd window:
msiexec /i python-2.7.8.msi TARGETDIR=c:\myproduct\python27
So, is there anyway to install Python 2.7 twice on my Windows machine?
Reasons I want to do this are:
My product requires a 32-bit version of Python 2.7 to be installed because it uses ctypes to load a 32-bit DLL. If the user already has a 64-bit version of 2.7 installed, I don't think it is safe to install the 32-bit version over the top.
Relying on the users pre-installed Python 2.7 is bad because they might uninstall it later. That would stop my product from working.
It reduces the complexity of testing my product if I can make its installer always install a known version of Python. I can rely on it being in a known state.
I'd like to add the pyreadline module to the Python install that is part of my product. I suspect most users would rather that I did not mess around with their Python install.
When a user uninstalls my product, the Python it installed should also be removed. If I installed Python in the standard place the user might come to use it for other purposes and be surprised when it goes missing when they uninstall my product.
It appears that you should be able to install the 32 bit version of Python 2.7 in another folder when the 64-bit version is already installed. See How do I install Python 2.7.3 32 bit and 64 bit on Windows side by side for a description. However it may be tricky to automate this, you might have to get users to install it themselves.
I would suggest you ask your users to install Python 2.7 32-bit, and give them instructions on how to do it if they already have a conflicting 64-bit version. Then in your installation you:
Ensure that virtualenv is installed (and install it if it is not).
Create a virtualenv in your application folder.
That addresses everything except the second item on your list and I think you simply have to accept that no matter what you do, if someone removes a component that you need your application will fail. If they do that they can use the 'repair' option on your installer from which you can either reinstall the missing Python or tell them that's what they need to do.
To install virtualenv I would first install pip (see https://pip.pypa.io/en/latest/installing.html for instructions, you need to download get_pip.py and run it with the Python 2.7 interpreter), then just run pip install virtualenv.