I'm using ldtp and while I import it ,my idle jump out with a error:
from ldtp import *
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/local/lib/python2.7/site-packages/ldtpd/__init__.py", line 38, in <module>
from xmlrpc_daemon import XMLRPCLdtpd
File "/usr/local/lib/python2.7/site-packages/ldtpd/xmlrpc_daemon.py",line 25, in <module>
import core
File "/usr/local/lib/python2.7/site-packages/ldtpd/core.py", line 24, in <module>
from pyatspi import findDescendant, Registry
ImportError: No module named pyatspi
And then I yum install pyatspi but found
No package pyatspi available.
Then I download pyatspi-2.20.0.tar.xz
During ./configure ,an error occurs as
configure: error: Package requirements (pygobject-3.0 >= 2.90.1) were not met:
No package 'pygobject-3.0' found
So I go back and try to install pygobject and found:
configure: error: Package requirements (glib-2.0 >= 2.24.0
gobject-introspection-1.0 >= 1.29.0
) were not met:
No package 'gobject-introspection-1.0' found
Excuse me ???
Is that the same thing we all have to suffer during install pyatspi???
What should I do to jump out from this nightmare?
Thanks for any help !
pyatspi is a part of GNOME. What you got involved into by building pyatspi from source was leading you into building a significant part of GNOME from source. No easy task at all.
Your best bet is to find AT SPI package for your distribution. You did not specify what linux distribution do you have. But for most common distributions such packages exist.
First make sure you have got python-gobject installed
For rpm-based distributions
rpm -q python-gobject
For dpkg-based:
dpkg -s python-gobject
Install it if necessary.
Next install a package containing pyatspi for your distribution.
For instance for OpenSUSE you need to install python-atspi
zypper in python-atspi
For Ubuntu and derivatives it is python-pyatspi:
apt-get install python-pyatspi
For RedHat, Fedora and derivatives it is at-spi-python
yum install at-spi-python
Having got that you should be able to type
python -c "import gi,pyatspi"
Related
I'm trying to install XGBoost on my AWS Ubuntu machine.
I followed the instructions and installed GCC and cmake. However, when I write
pip install xgboost
I get the following error
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-sorzhu8y/xgboost/setup.py", line 29, in <module>
LIB_PATH = libpath['find_lib_path']()
File "/tmp/pip-build-sorzhu8y/xgboost/xgboost/libpath.py", line 45, in find_lib_path
'List of candidates:\n' + ('\n'.join(dll_path)))
XGBoostLibraryNotFound: Cannot find XGBoost Libarary in the candicate path, did you install compilers and run build.sh in root path?
List of candidates:
/tmp/pip-build-sorzhu8y/xgboost/xgboost/libxgboost.so
/tmp/pip-build-sorzhu8y/xgboost/xgboost/../../lib/libxgboost.so
/tmp/pip-build-sorzhu8y/xgboost/xgboost/./lib/libxgboost.so
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-sorzhu8y/xgboost/
Any ideas what could be causing this?
According to python documentation:
This module makes available standard errno system symbols. The value
of each symbol is the corresponding integer value. The names and
descriptions are borrowed from linux/include/errno.h, which should be
pretty all-inclusive.
So Error code 1 is defined in errno.h and means Operation not permitted.
Your setuptools do not appear to be installed.
So, try to upgrade python tools
pip install --upgrade setuptools
If it's already up to date, check that the module ez_setup is not missing. If it is, then
pip install ez_setup
Then try again
pip install unroll
If it's still not working, maybe pip didn't install/upgrade setup_tools properly so you might want to try
easy_install -U setuptools
and again
pip install unroll
for me was resolved after upgrading pip
let us know about you..
There are instruction in the site: http://xgboost.readthedocs.io/en/latest/build.html
First:
git clone --recursive https://github.com/dmlc/xgboost
cd xgboost
make -j4
Then:
cd python-package
sudo python setup.py install
After entering the following in the command line:
sudo apt-get install python3 python3-dev python3-pip
sudo pip3 install cx_Freeze Cython PyOpenGL PyOpenGL_accelerate
sudo python3 setup.py install_exe
The last command gives me this error:
Could not import cx_Freeze. Building executable not possible.
Traceback (most recent call last):
File "setup.py", line 13, in <module>
from Cython.Build import cythonize
ImportError: No module named 'Cython'
Any ideas why?
I'm using Linux Mint 17.3 'Rosa' Cinnamon 64-bit.
[EDIT]
This problem was a complete mess and I still have no clue what happened before. I have given up trying to get Python to work, as I have found an application that does the same thing as the Python application I was trying to get working. It's such a pain.
Followed instructions on the github page. Of course, had to make minor changes since I was working with a windows 7 system. I got to the point post creating the virtual environment for portia to run. And I was trying to install the required packages using pip.
pip install -r requirements.txt
It failed with a log.
Now in the shell I try to run twistd, it gives error saying command not found. I even tried as follows:
deostroll#DEOTOP /c/Portia/portia/slyd (master)
$ python ../../portia_env/Scripts/twistd.py -n slyd
Traceback (most recent call last):
File "../../portia_env/Scripts/twistd.py", line 13, in <module>
from twisted.scripts.twistd import run
File "c:\Portia\portia_env\lib\site-packages\twisted\__init__.py", line 53, in
<module>
_checkRequirements()
File "c:\Portia\portia_env\lib\site-packages\twisted\__init__.py", line 37, in
_checkRequirements
raise ImportError(required + ": no module named zope.interface.")
ImportError: Twisted requires zope.interface 3.6.0 or later: no module named zop
e.interface.
(portia_env)
deostroll#DEOTOP /c/Portia/portia/slyd (master)
$
Is there an alternate procedure to follow in order to make this work on windows?
It looks like zope.interface didn't install when you ran:
pip install -r requirements.txt
Could you try running the following and see if it works?
pip install zope.interface
I tried to install statsmodels Python library on a Fedora 19 system. I used easy_install as follows:
easy_install -U statsmodels
But I get the following error while installing:
error: SandboxViolation: os.open('/root/.matplotlib/tmpvjSAwn', 131266, 384) {}
The package setup script has attempted to modify files on your system
that are not within the EasyInstall build area, and has been aborted.
This package cannot be safely installed by EasyInstall, and may not
support alternate installation locations even if you run its setup
script by hand. Please inform the package's author and the EasyInstall
maintainers to find out if a fix or workaround is available.
What's wrong here?
In the setup.py in source, add
os.environ["MPLCONFIGDIR"] = "."
after import os
Then I got the following error when I called the
python setup.py install
from the statsmodels directory.
Traceback (most recent call last):
File "setup.py", line 465, in <module>
check_dependency_versions(min_versions)
File "setup.py", line 124, in check_dependency_versions
raise ImportError("statsmodels requires patsy. http://patsy.readthedocs.org")
pasty was missing in the system. So only thing I had to do was installing pasty. using
easy_install --upgrade patsy
then I could install statsmodels from the source in the normal way.
There might be other questions similar to this but, in my particular case, I don't have super user (sudo) access to the machine and I have locally installed Python 2.7.
>>> import sqlite3
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/spicmacay/.local/lib/python2.7/sqlite3/__init__.py", line 24, in <module>
from dbapi2 import *
File "/home/spicmacay/.local/lib/python2.7/sqlite3/dbapi2.py", line 27, in <module>
from _sqlite3 import *
ImportError: No module named _sqlite3
>>>
UPDATE: When I run ./configure&& make, I get:
make
running build
running build_ext
building dbm using gdbm
INFO: Can't locate Tcl/Tk libs and/or headers
Python build finished, but the necessary bits to build these modules were not found:
_sqlite3 _tkinter bsddb185
dl imageop sunaudiodev
To find the necessary bits, look in setup.py in detect_modules() for the module's name.
running build_scripts
Came to this issue also.. fixed by compiling Python and passing sqlite3 headers/libs during ./configure
Python 2.7.3 _sqlite3 module is not being built after passing headers/libraries
Posted just in case anyone else has this issue in the future and does not have sudo access to a node.
This happened me recently. You need to apt-get install libsqlite3-dev (on debian - sqlite-devel possibly elsewhere) and recompile python.
If you first ./configure sqlite3 with a --prefix option, then make and make install it and then use the same --prefix when compiling Python, the Python installation will be able to magically find and use the sqlite3 you just installed.
cd sqlite-autoconf-3080100
./configure --prefix=/home/xdanek7/appscale/local
make
make install
cd ../Python-2.7.6
./configure --prefix=/home/xdanek7/appscale/local
make
make install
Try adding sudo before the command apt-get install libsqlite3-dev to get rid of "NO root access"
i.e on terminal, write:
sudo apt-get install libsqlite3-dev