wx.lib.activex fails to import using Enthought Canopy and EPD - enthought

import wx.lib.activex fails with the supplied version of wx in Enthought Canopy or EPD on Windows. How can I get the activex container to work with the Enthought Python Distributions?

First of all, it's necessary to install comtypes, which is a dependency not available through the Enthought package manager.
The more serious problem however, is that Enthought seem to have erroneously omitted the two myole4ax.* files which are necessary to use the activex container in wx Python. You can copy these files by downloading the wxPython-src tarball from the project page, and copying the two myole4ax.* files (e.g. from wxPython-src-2.8.12.1\wxPython\wx\lib) to the %python root%\Lib\site-packages\wx\lib folder.

Related

How to install pre-built Pillow wheel with libraqm DLLs on Windows?

I tried using the pre-built wheels for Pillow and corresponding libraqm DLL from here:
https://www.lfd.uci.edu/~gohlke/pythonlibs/#pillow
But the following returns False:
from PIL import features
features.check('raqm')
Am I missing anything?
Context: I need libraqm with Pillow to work with complex fonts on images, as shown here.
For anyone who wants RAQM with PIL on Windows, just do pip install Pillow.
Then place the libraqm DLLs in some directory, and then append that directory to environment/shell variable PYTHONPATH. That's it.
Or you could place those DLLs along with your python.exe as commented by #cgohlke.
Just in-case someone wants to know, I'm currently on Python 3.7 (Windows 10) with Pillow 7.2.0 and libraqm-0.7.0.dll

Unresolved reference error when importing basic modules on Pycharm 4.0.1 and OS X Yosemite 10.10.1

After upgrading PyCharm to version 4.0.1 and OS X Yosemite to version 10.10.1, I encountered the following problem:
When trying to import basic modules, e.g: import time or import sys, PyCharm marks the import as an "Unresolved reference" (red underline) and does not recognise the module name.
When trying to figure it out, I noticed that while writing the module name the auto completion pop up is finding a match on the 'lib-dynload' folder within my virtualenv path (/Users/myname/Envs/envname/lib/python2.7/lib-dynload) rather than on the 'site-packages' folder.
There are also added to the PYTHOPATH in this order (lib-dynload before site-packages).
As a workaround I removed the lib-dynload path from the "project interpreter" setting window in PyCharm which made PyCharm recognise the basic modules again, but I am not sure what other impacts this change might have.
My Question is whether there is a way to reproduce the original behaviour PyCharm had so it would recognise the basic modules without tampering the paths of the virtualenv used as a project interpreter.
I am using a separate installation of Python (/usr/local/Cellar/python/2.7.6/bin/python) and virtualenv version 1.10.1.
I'm using pycharm 4.0.1 and virtualenv 1.11.6 and everything works fine to me, but i'm on Arch Linux not OSX.
You may try to recreate the virtualenv, and invalidate and restart the pycharm cache, then wait for pycharm to index again your virtualenv.
Don't know if this is too much of a hassle to you, maybe it is worth a try.
This is a django project tree i tried:
This is probably a bug, a recent youtrack issue seems to match your problem.

How to install package from github

I would like to use psd-tools package from github.
Given I am not a programer, I found the installation process difficult to follow.
Can someone advice in simple terms how to install and use the psd-tool package.
Apparently, this is all done via the terminal in OSX.
If I understand correctly the package requires python, pip, pillow and packbits to run correctly.
Python is pre installed in OSX. Pip and packbits need to be installed. This where I start to get lost with the installation procedure.
Once the psd-tools package is installed, I am not sure how to call the package to test a psd file.
github psd-tools package
Download Python package for working with Adobe Photoshop PSD files
Installation
pip install psd-tools
Pillow should be installed if you want work with PSD image and layer data: export images to PNG, process them. PIL library should also work.
pip install Pillow
Note
In order to extract images from 32bit PSD files PIL/Pillow must be built with LITTLECMS or LITTLECMS2 support.
psd-tools also has a rudimentary support for Pymaging. Pymaging installation instructions are available in pymaging docs. If you want to use Pymaging instead of Pillow you'll also need packbits library:
pip install packbits
Usage of PSD-Tools and How to use it Read this.
Hope it Helps!

Packages missing from new install of Canopy Express

I just installed Canopy Express 1.4.1 (32-bit) for Windows. Among the packages that are supposed to be there (see https://www.enthought.com/products/canopy/package-index/ ) are pandas and statsmodels. But after installing, neither is listed in Package Manager, either as being installed or available.
The lack of pandas is not a problem, as pip easily installs it. (Enthought notes that packages installed that way will not be listed in Package Manager, but are fully available in the Canopy User Environment. Indeed, it imports.
statsmodels is not so easy. pip only gets source, and there is no Windows installer provided by the statsmodels folks. There is a nightly Windows binary, but not (if I'm reading correctly) for the stable build. The suggested solution by statsmodels is to compile it, using MinGW, which I do not currently have installed.
With enough trouble, I imagine I could compile and install, but is there a way to save all that trouble and get the packages within Canopy, as Enthought says it should be?
Seems like your Package Manager is misbehaving or you are looking in the wrong place (look in Free Packages not Community Packages).
Pandas is indeed in the Express installer, so always installed. At Canopy's python prompt, type:
import pandas
Though sounds like you've already overwritten it with pip, not really a problem but not the cleanest path (mixing 2 different installation methods for the same package).
Statsmodels is listed in package manager (Free package). It is available to free users but is not yet in the Express installer.
If you still don't see these in the pkg mgr, please quit Canopy, ensure that all Canopy processes have terminated (easiest way... log out of Windows, then back in), and restart Canopy.

latest version of rdflib (4.0...) is not available for canopy enthought

I have to work with rdflib 4.0.1 (the latest version of it) to work with sparql, but this package is not available in the Package Manager of Canopy (Enthought).
How can I install it, in this situation?
The rdflib package is not in the Canopy / EPD repository.
Rather, it is in the "Community" (PyPi mirror) repo (marked by the "PyPI" logo in the Package Manager), which contains 11,000 untested ("as is") packages. Most of the packages are current and we are in the process of updating the rest, as well as keeping it updated from now on. Please note that we do not test for nor necessarily provide dependencies.
Meanwhile, this may help:
"Installing external packages into Canopy Python"
If you follow the link to installing external packages in Canopy that #jonathan-march provided, point three says to follow the "standard Python installation procedures." It also includes information on installing pip. I would install pip using Canopy's instructions and then simply run pip install rdflib, which will install RDFLib 4.0.1.
To install a package which is not available in the Canopy / EPD repository, follow standard Python installation procedures from the OS command line. If you want to use pip, install it first:
easy_install pip (Please check this article for more info on using enpkg)