Pango Import is not working - python

I am very new into this python and its dependencies.
I'm trying to install Cairo and Pango,
I have successfully installed Cairo, Cairocffi, cffi, Pygi, and gtk+, and they are working just fine.
I have tried many ways for the past three days to set up Pango, but it did not working at all.
FYI I'm using Windows 10 64 bit system and Python27
I've seen one tutorial from this site https://community.webfaction.com/questions/11481/how-to-install-pango-and-cairo-pangocairo-for-python
but it's Unix based, Is there any any I can do this in windows version?
and from other site, they said after downloading and installing I should compile pango and pygtk ? How can I do so in windows ? Thank you

Hard to say,, but I'd suggest you start over with an install of anaconda, https://www.continuum.io/downloadsparticularly since you are using Windows.. Then using Anaconda install the other packages.

Related

Can't find Brew installed packages on Mac M1 in Pycharm

I'm having trouble installing packages and using them in Pycharm. I've followed various threads (I'm new to Macs and seem to have tried everything) now I'm stuck.
In this case, I want to use the package xgboost.
I have brew installed, after launching a terminal using Rosetta:
%brew install xgboost
Warning: xgboost 1.3.3 is already installed and up-to-date.
It appears installed OK here:
/opt/homebrew/Cellar/xgboost
I also have Python installed here:
/opt/homebrew/Cellar/python#3.9
But no matter how I configure an Interpreter in Pycharm, I can't seem to get the package recognised.
Where have I gone wrong?
I am very unsure exactly how, but I've got this working.
Following: https://abbasegbeyemi.me/blog/homebrew-python-apple-m1
I changed the order of elements in my path:
export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/homebrew/bin
then a new interpreter in Pycharm using:
usr/local/Cellar/Python#3.9/3.9.2_2/bin/python3.9
Now I can install packages just using pip in pycharm and it works.
This has been 6 hours of pain - warning to anyone who isn't well versed in macs, setting up an M1 for python dev was a complete nightmare for me.
Docs: https://xgboost.readthedocs.io/en/latest/build.html
Pre-built binary wheel for Python
If you are planning to use Python, consider installing XGBoost from a pre-built binary wheel, available from Python Package Index (PyPI). You may download and install it by running
# Ensure that you are downloading one of the following:
# * xgboost-{version}-py2.py3-none-manylinux1_x86_64.whl
# * xgboost-{version}-py2.py3-none-win_amd64.whl
pip3 install xgboost

I cannot install dipy library for python, why ? In the description I explain what I did

I went to http://nipy.org/dipy/installation.html and install nibabel, then I when I wanted to install dipy, there where 2 problems:
Wheel was not built
and vcvarshall.bat not found.
What I did ?
Install Setuptools in site-pakcages
download Setuptools-34.3.1-py2.py3-none-any.whl (md5) and save in site-packages
I also try
python setup.py install --compiler=mingw32รง
and
If you get an error saying unable to find vcvarsall.bat then you need to create a file called pydistutils.cfg in notepad and give it the contents
[build]
compiler=mingw32
But setup.py de system it did not find, and I still have vcvarshall.bat not found.
what I need to do?
I am using, Windows 7, Python 3.5.1 and Anaconda 2.5.0 (64 bit)
You will almost certainly find it easier to install third-party packages if you adopt virtual environments. When done correctly you will then not need admin privileges to install packages into virtualenvs. The HitchHikers' Guide to Python contains more information about this.
The vcvarsall.bat is, I believe, a part of the Visual Studio (the Express version is available at no cost) environment. It's required when you are trying to build a compiled Python extension as described in this article. I'm not sure how that will play with mingw.
So, I installed via ANACONDA but , when I go to python, and I want to import dipy it says: No modle named dipy
Solved ! Well I had python 3.5 and dipy has some issues with that version, so I installed Anaconda with python 2.7 , installed visual c++9 and follow the steps on the web !

numpy installation on windows 7

I have Python 2.7.9 installed on Windows 7. When I try to install numpy package through pip or by downloading numpy.zip and running python setup.py install, I get various errors containing absence of various libraries. Is it possible to install numpy on Windows for 64-bit Python?
Have you tried these questions/answers?
https://stackoverflow.com/a/28947511/3412545
https://stackoverflow.com/a/4554296/3412545
Installing numpy, matplotlib on windows 7 64 bit
Otherwise, try another distribution link and report back the results here.
EDIT: Found good installation notes for posterity including plugin versions for python 2.7.9
https://code.google.com/p/pythonxy/wiki/StandardPlugins

How do I install web2py in a virtualenv in Windows 7?

I'm new to Python and I'm trying to install web2py in a virtualenv. I'm running a 32 bit python 2.7.3 installation on a 64 bit Windows 7.
From what I read, this should be the process:
install virtualenv (done)
create the virtualenv (done)
install pywin32 in that env (I've read it needs to be installed before the web2py installation)
install web2py in that env
First and foremost: is that right? If so, then...
I tried installing pywin32 through
'''easy_install pywin32-218.win32-py2.7.exe'''
It went fine. Then, I checked the virtual environment's site-packages for a pywin32 folder and it was there, but I couldn't import it into python ('''ther's no module pywin32'''). The environment was definitely active (I double-checked).
As a test, without using virtualenv, I double-click-installed the pywin32 binary (downloaded the 32 bit version for python 2.7 -- pywin32-218.win32-py2.7.exe) but got an error at the end:
'''close failed in file object destructor:
sys.excepthook is missing
lost sys.stderr'''
I downloaded the file again (could be corrupted), tried installing it again but got the same result.
Could anybody guide me or point me to a step-by-step install of pywin32 (if necessary) and then web2py for windows 7? I'd really appreciate it.
its a bug: http://sourceforge.net/tracker/?func=detail&aid=3402824&group_id=78018&atid=551954,
workaround here : http://pywin32.hg.sourceforge.net/hgweb/pywin32/pywin32/rev/a64d8ac23e61
similar to this: Error installing and running pywin32 2.7
In my experience, the command easy_install pywin32-218.win32-py2.7.exe under an active virtualenv works fine.
To test the installation of pywin32, from python you can try:
from win32api import GetVersionEx
print GetVersionEx()
Obtaining something similar to (windows major version, minor version, build number, platform id, additional informations):
(6, 1, 7601, 2, 'Service Pack 1')
You cannot import module pywin32 because it doesn't exist.
After the installation of pywin32, you can install web2py under the active virtualenv (I tested it until to opening the admin interface, no guarantee after this :-):
download the source code from http://www.web2py.com/init/default/download
unzip it to ...\virtualenvdir\Lib\site-packages\ (obtaining: ...\virtualenvdir\Lib\site-packages\web2py\...)
cd to ...\virtualenvdir\Lib\site-packages\web2py
start the web2py server: python web2py.py
At the date, I couldn't install web2py using pip. First of all, it grabs an old version of web2py from PyPy. When I tryed to use this version of web2py I got an error ImportError: No module named .... The same using pip on a copy of the web2py source file.

PINAX & PIL Installation on Windows 7

I have Python 2.7 on Windows 7 x64. I have installed virtualenv and installed Pinax withing the project in virtualenv. When I try to syncdb I recieve an error stating PIL is needed. I tried installing PIL 1.1.7 for 2.7, but it did not install correctly. When I ran syncdb I get the following error.
Error: One or more models did not validate:
photologue.photo: "image": To use ImageFields, you need to install the Python Im
aging Library. Get it at http://www.pythonware.com/products/pil/ .
photologue.watermark: "image": To use ImageFields, you need to install the Pytho
n Imaging Library. Get it at http://www.pythonware.com/products/pil/ .
avatar.avatar: "avatar": To use ImageFields, you need to install the Python Imag
ing Library. Get it at http://www.pythonware.com/products/pil/ .
photos.image: "image": To use ImageFields, you need to install the Python Imagin
g Library. Get it at http://www.pythonware.com/products/pil/ .
As I understand it is because this is a x32. So I downloaded the unoffical x64 version from http://www.lfd.uci.edu/~gohlke/pythonlibs/#pil and tried to install. Windows installer states that it can not locate python so it can not install PIL. I checked the registry and python is there.
Any thoughts because I am lost?
It's been awhile since I worked on Windows, but I believe you might need to install a 64-bit version of Python. I could be wrong, but I wouldn't think that 32-bit Python would be able to run 64-bit libraries. I think the error message you are seeing is that the 64-bit PIL is looking for 64-bit Python and can't find it.
You can install 32 bit PIL on Win7x64 as long as you are running 32 bit Python.

Categories