PYPATH No registry key error on installing Gaphor with Python - python

I have downloaded setup exe from http://sourceforge.net/projects/gaphor. I am already having installation of Python2.7, PyGTK (Complete package). So when I start the install, I deselect Python2.5, PyGtk etc (as I already have python2.7). But as soon as I begin installation, I got the error:
PyGtkGUI can't be installed as Python not found on this system. PYPATH = No Registry key found.
NOTE:
I am able to proceed, actually i downloaded source code and build it and is working from there. However i would like to know the solution for the original problem reported.

you must add an environment variable
http://www.itechtalk.com/thread3595.html
and use official site wiki:
https://github.com/amolenaar/gaphor/wiki/Custom-Python-Installation-Location

Related

Add dictionary to pyenchant

Using Mac OSX 10.12.3 with Python 3.
I have installed pyenchant but it only works with the preinstalled dictionaries.
import enchant
print(enchant.list_languages())
['de_DE', 'en_AU', 'en_GB', 'en_US', 'fr_FR']
I have installed Homebrew and tried to install the Swedish language dictionary from ftp://ftp.gnu.org/gnu/aspell/dict/0index.html following this answer: https://stackoverflow.com/a/35757817/4802426
brew install aspell-sv
Error: No available formula with the name "aspell-sv"
==> Searching for a previously deleted formula...
Error: No previously deleted formula found.
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
Error: No formulae found in taps.
I've also tried to install it using this answer: https://stackoverflow.com/a/11807786/4802426
But that doesn't work either. Installing with this method works fine but when listing languages as above no new languages show up. I have tried the above mentioned methods for different languages and providers, e.g. myspell-es, aspell-es etc.
How do I move forward from here? Others must have tackled the same problem.
The same problem exists when using virtual environments.
enchant.Broker().describe() only lists Myspell as found provider.
Myspell dictionaries can be manually loaded from the libre office dictionaries repository and installed by copying the .dic and .aff file into the enchant side-package path. E.g. ~/.virtualenvs/<venv>/lib/python3.7/site-packages/enchant/share/enchant/myspell
Not sure whether pyenchant works fine with Python3. Did you put the downloaded dictionary file in the right site-packages folder of Python3?
Official pyenchant tutorial for osx users
Update:
To find python3 site-packages folder on osx: type python3 to get into python interactive shell, then import sys;sys.exec_prefix to find your python3 path. The folder path will be appending your python3 path with /lib/pythonX.Y/site-packages, where X.Y is your python3 specific version number.

How to import win32api module in python? [duplicate]

When running python26 under windows OS (64bits).....
I have got errors like:
import win32api" error in Python 2.6: pywintypes26.dll
or
pythoncom26.dll missing
ImportError: DLL load failed: The specified module could not be found.
I have done the msi installation for python26
all dlls can be found under C:\Python26\Lib\site-packages\pywin32_system32
After I copy pywintypes26.dll and pythoncom26.dll from C:\Python26\Lib\site-packages\pywin32_system32 to C:\Python26\Lib\site-packages\win32 -> Solve the problem!
I also hit a problem importing win32api.
The post-install script for pywin32 failed, which should copy pythoncom26.dll, pythoncomloader26.dll, and pywintypes26.dll, among other things. I ran it by hand and my installation was fixed.
python scripts\pywin32_postinstall.py -install
I had a similar problem when installing under 64 bit Python 3.4.2. I ran the install executable pywin32‑219.win‑amd64‑py3.4.exe from http://www.lfd.uci.edu/~gohlke/pythonlibs/ .
On the site it states clearly:
"Python 3.4 users must manually run python.exe Scripts\pywin32_postinstall.py -install from an elevated command prompt."
which I did not do first time round; I installed from a normal prompt getting the following feedback:
c:\python34>python.exe Scripts\pywin32_postinstall.py -install
Copied pythoncom34.dll to C:\Python34\pythoncom34.dll
Copied pywintypes34.dll to C:\Python34\pywintypes34.dll
You do not have the permissions to install COM objects.
The sample COM objects were not registered.
etc.etc.
Finishing with "The pywin32 extensions were succesfully installed" ...
I only read the last sentence and I started to run some code resulting in getting these dll load fails.
So, did some research, and started an elevated prompt (how: see "http://www.sevenforums.com/tutorials/783-elevated-command-prompt.html") and again ran:
c:\python34>python.exe Scripts\pywin32_postinstall.py -install
Copied pythoncom34.dll to C:\Windows\system32\pythoncom34.dll
Copied pywintypes34.dll to C:\Windows\system32\pywintypes34.dll
Registered: Python.Interpreter
Registered: Python.Dictionary
Registered: Python
-> Software\Python\PythonCore\3.4\Help[None]=None
-> Software\Python\PythonCore\3.4\Help\Pythonwin Reference[None]='C:\\Python34\\Lib\\site-packages\\PyWin32.chm'
Pythonwin has been registered in context menu
Shortcut for Pythonwin created
Shortcut to documentation created
The pywin32 extensions were successfully installed.
And now my code runs happily (as far as this matter is concerned... sigh, so much other stuff to do).
Run the installer as Administrator and it works:
Right click on pywin32-installer.exe
Choose "Run as Administrator"
As suggested above the post install script is not run, this issue can be seen when installing from a wheel (As I encountered)
python scripts\pywin32_postinstall.py -install
If find you have this issue when installing via wheels, then installing it from here can solve the above issue.
https://pypi.python.org/pypi/pypiwin32
There appears to be a bug in the installer. The recommended workaround in the ticket is the same one as proposed by Dave Bremer.
I could fix this situation by removing all installed Python3.4 versions (had forgotten to uninstall 3.4.1 before installing 3.4.2), deleting C:\Python34 and after installing Python 3.4.2 pywin32-219.win32-py34.exe could be installed and called without problems.
So, copying around DLLs should NOT be necessary!
I always install the Active State Python distro which installs the win32 packages for you and gets it right.
If the above didn't fix the problem, you're still missing the msvcr100.dll file. It's either in your \System32\ folder, or more likely in your c:\PythonXX\Lib\site-packages\win32\ folder.
That fixed it for me after hours of search to no avail, even though it looks like the import still isn't resolved as it should be (PyCharm still gives me the squiggly underline), but it works.
First I was using pip to install pywin32 in anaconda environment, that's why no matter what I did it was failing. After trial and error, I figured out that
conda install pywin32
is the right way to install pywin32 in the anaconda package manager.
I don't know whether it's too late or not to answer this question. I also hit this problem, and I tried every method above, but neither of them worked.
Finally, I found the reason. When we install pywin32, we must choose the one that fits python's version(2.6, 2.7, 3.3, etc) and python's bit number(x64 or x86). Notice, it must fit python's bit number, not PC's bit number. If you install x86 python in a x64 PC, you have to install a pywin32 with x86.
In my case i had to copy pywintypes26.dll and pythoncom26.dll files into C:\Windows\System32 folder to work it properly in jupyter notebook.
I am using windows 10 OS with multiple python versions

PyQtDeploy "Unable to copy file"

First time I build an application for Windows, so I used Python+pyqt5 since I had good experience with C++/Qt5 on Linux.
I'm now trying to get an executable for deployment, but the one generated py2exe complained about missing the Qt Windows plugin. I moved to pyqtdeploy as it seemed to be more specifically designed with pyqt in mind, but after setting the paths I just get an "Unable to copy file error".
Anybody got an idea how to get this to work?
The locations I set are as follows:
Interpreter: C:\Python34\python.exe
Include Directory: C:\Python34\include
Python Library: C:\Python34\DLLs\python3.dll
Standard Library Directory: C:\Python34\Lib
Today, I faced the same problem. After some debugging I found out that pyqtdeploy looks for the correct bootstrap-<version>.py script it wants to use, by looking at the version in the filename of the Python library (python3.dll in our case).
The solution is to use <windows-dir>\system32\python34.dll or <python-install-dir>\python34.dll as the Python library. The former will be present when you install Python for all users, the latter will be present when you install Python "just for me" (see this screenshot).
After renaming python3.dll to python34.dll, everything worked again.

Django with VS2010 gives me "ImportError: No module named django.core.management" when running

I'm trying to follow this tutorial and I'm getting the following error:
ImportError: No module named django.core.management
I'm completely new to python. I believe Visual studio is using a version of python I already had installed in c:\Python27, could that be causing a problem?
Someone mentioned in a link I found that they had to copy the 'django' folder to the project folder, but I don't know where that would be. I don't even know what the error means really unless there's a missing package (like dll or assembly in .NET?), but I don't know what paths python would use to try to find a package or even what one would look like.
I see there's a PYTHONPATH environment variable that I don't have declared, should I declare that? Should it point to the C:\Python27 directory?
First, do you have checked your "Python Environment" in your project folder? It may seems like...
Here you may find your django with version. If you dont find it then compile setup.py from django folder again with desire python version. And then right click on "Python Environments" from your project and click on "Add/Remove Python Environments" to select python version.
Ok with a lot of fooling around I found this directory:
%LOCALAPPDATA%\Microsoft\Web Platform Installer\installers\PythonDetectInstalls
In a mangled sub-folder there is a powershell script DetectPythonInistalls.ps1 that has these two lines for checking if python is installed already:
$regKey = "hklm:SOFTWARE\Python\PythonCore\$pythonVersion\InstallPath";
$correctRegKey = "hklm:SOFTWARE\Wow6432Node\Python\PythonCore\$pythonVersion\InstallPath";
Uninstalling all my pythons did not remove these keys. After removing these registry keys with regedit, WPI allowed me to install its own version of python 2.7 and all the other goodies to go with the Windows Azure Python SDK and it worked.

import win32api error in Python 2.6

When running python26 under windows OS (64bits).....
I have got errors like:
import win32api" error in Python 2.6: pywintypes26.dll
or
pythoncom26.dll missing
ImportError: DLL load failed: The specified module could not be found.
I have done the msi installation for python26
all dlls can be found under C:\Python26\Lib\site-packages\pywin32_system32
After I copy pywintypes26.dll and pythoncom26.dll from C:\Python26\Lib\site-packages\pywin32_system32 to C:\Python26\Lib\site-packages\win32 -> Solve the problem!
I also hit a problem importing win32api.
The post-install script for pywin32 failed, which should copy pythoncom26.dll, pythoncomloader26.dll, and pywintypes26.dll, among other things. I ran it by hand and my installation was fixed.
python scripts\pywin32_postinstall.py -install
I had a similar problem when installing under 64 bit Python 3.4.2. I ran the install executable pywin32‑219.win‑amd64‑py3.4.exe from http://www.lfd.uci.edu/~gohlke/pythonlibs/ .
On the site it states clearly:
"Python 3.4 users must manually run python.exe Scripts\pywin32_postinstall.py -install from an elevated command prompt."
which I did not do first time round; I installed from a normal prompt getting the following feedback:
c:\python34>python.exe Scripts\pywin32_postinstall.py -install
Copied pythoncom34.dll to C:\Python34\pythoncom34.dll
Copied pywintypes34.dll to C:\Python34\pywintypes34.dll
You do not have the permissions to install COM objects.
The sample COM objects were not registered.
etc.etc.
Finishing with "The pywin32 extensions were succesfully installed" ...
I only read the last sentence and I started to run some code resulting in getting these dll load fails.
So, did some research, and started an elevated prompt (how: see "http://www.sevenforums.com/tutorials/783-elevated-command-prompt.html") and again ran:
c:\python34>python.exe Scripts\pywin32_postinstall.py -install
Copied pythoncom34.dll to C:\Windows\system32\pythoncom34.dll
Copied pywintypes34.dll to C:\Windows\system32\pywintypes34.dll
Registered: Python.Interpreter
Registered: Python.Dictionary
Registered: Python
-> Software\Python\PythonCore\3.4\Help[None]=None
-> Software\Python\PythonCore\3.4\Help\Pythonwin Reference[None]='C:\\Python34\\Lib\\site-packages\\PyWin32.chm'
Pythonwin has been registered in context menu
Shortcut for Pythonwin created
Shortcut to documentation created
The pywin32 extensions were successfully installed.
And now my code runs happily (as far as this matter is concerned... sigh, so much other stuff to do).
Run the installer as Administrator and it works:
Right click on pywin32-installer.exe
Choose "Run as Administrator"
As suggested above the post install script is not run, this issue can be seen when installing from a wheel (As I encountered)
python scripts\pywin32_postinstall.py -install
If find you have this issue when installing via wheels, then installing it from here can solve the above issue.
https://pypi.python.org/pypi/pypiwin32
There appears to be a bug in the installer. The recommended workaround in the ticket is the same one as proposed by Dave Bremer.
I could fix this situation by removing all installed Python3.4 versions (had forgotten to uninstall 3.4.1 before installing 3.4.2), deleting C:\Python34 and after installing Python 3.4.2 pywin32-219.win32-py34.exe could be installed and called without problems.
So, copying around DLLs should NOT be necessary!
I always install the Active State Python distro which installs the win32 packages for you and gets it right.
If the above didn't fix the problem, you're still missing the msvcr100.dll file. It's either in your \System32\ folder, or more likely in your c:\PythonXX\Lib\site-packages\win32\ folder.
That fixed it for me after hours of search to no avail, even though it looks like the import still isn't resolved as it should be (PyCharm still gives me the squiggly underline), but it works.
First I was using pip to install pywin32 in anaconda environment, that's why no matter what I did it was failing. After trial and error, I figured out that
conda install pywin32
is the right way to install pywin32 in the anaconda package manager.
I don't know whether it's too late or not to answer this question. I also hit this problem, and I tried every method above, but neither of them worked.
Finally, I found the reason. When we install pywin32, we must choose the one that fits python's version(2.6, 2.7, 3.3, etc) and python's bit number(x64 or x86). Notice, it must fit python's bit number, not PC's bit number. If you install x86 python in a x64 PC, you have to install a pywin32 with x86.
In my case i had to copy pywintypes26.dll and pythoncom26.dll files into C:\Windows\System32 folder to work it properly in jupyter notebook.
I am using windows 10 OS with multiple python versions

Categories