ImportError: No module named pyopengv - python

Hi, I am having problem using openSFM. My first time....
I tried the command
bin/opensfm_run_all data/berlin
and the error comes out like this:
Running using Python command: python
Traceback (most recent call last):
File "/home/yjw/OpenSfM/bin/opensfm", line 10, in <module>
from opensfm import commands
File "/home/yjw/OpenSfM/opensfm/commands/__init__.py", line 4, in <module>
from . import match_features
File "/home/yjw/OpenSfM/opensfm/commands/match_features.py", line 9, in <module>
from opensfm import matching
File "/home/yjw/OpenSfM/opensfm/matching.py", line 3, in <module>
import pyopengv
ImportError: No module named pyopengv
It seems like pyopengv is not installed so I tried the
pip install opengv and pip3 install opengv
but then another problem comes out...
Collecting opengv
Could not install packages due to an EnvironmentError: 404 Client Error: Not Found for url: https://pypi.org/simple/opengv/
Can anyone give me solution, please? Thanks is advance!!

The problem is that there is no opengv library in PyPi repository, you have to install it manually as explained here: http://laurentkneip.github.io/opengv/page_installation.html
sudo apt-get install build-essential cmake libeigen3-dev
git clone https://github.com/laurentkneip/opengv
cd opengv
mkdir build && cd build && cmake .. && make

It is an environment error. it is likely that opengv for python V3 has been installed into the python V2 folder. Please try using opengv's cmake option
cmake ../opengv -DBUILD_PYTHON=ON -DPYBIND11_PYTHON_VERSION=3.6 -DPYTHON_INSTALL_DIR=/usr/local/lib/python3.6/dist-packages/

Related

XGBoost installation failing

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

Packaging an Agent in Volttron

We are trying to package an agent. These are the steps we have done:
cd volttron //go to volttron directory
source env/bin/activate //activate the terminal
volttron-pkg package examples/thermoWrite //package the agent we wrote
Here is the error message comes out:
(volttron)pi#raspberrypi:~/volttron $ volttron-pkg package examples/thermoWrite
Traceback (most recent call last):
File "setup.py", line 78, in <module>
_temp = __import__(agent_module, globals(), locals(), ['__version__'], -1)
File "/tmp/tmpI0zsTG/pkg/Agent/agent.py", line 7, in <module>
import psycopg2
ImportError: No module named psycopg2
2017-03-21 17:55:05,988 () volttron.platform.packaging ERROR: Command
'['/home/pi/volttron/env/bin/python', 'setup.py', '--no-user-cfg', '--quiet',
'bdist_wheel']' returned non-zero exit status 1
I did install psycopg2 in my system, using command: sudo apt-get install python-psycopg2 in terminal
For my understanding is we miss the module psycopg2 inside the volttron. But we have no idea how to install a module inside the volttron. We have tried copy and paste module file into ./volttron/env/lib/python2.7/site-packages, it seems not working. Someone please help. Thanks.
With the VOLTTRON environment activated run:
pip install psycopg2
That will install the python module that it is trying to import.

How to install pyatspi?

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"

Installation Error while installing portia

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

Redhat trying to use pip ImportError: No module named pip

I am trying to use pip on my Redhat system.
I installed pip following the instructions here, but when I try to use it, for example pip install, I get the following error code:
Traceback (most recent call last):
File "/usr/local/bin/pip", line 7, in ?
from pip import main
ImportError: No module named pip
this issue due to common user do not have privilege to access packages py file.
1. root user can run 'pip list'
2. other common user cannot run 'pip list'
[~]$ pip list
Traceback (most recent call last):
File "/usr/bin/pip", line 7, in <module>
from pip._internal import main
ImportError: No module named pip._internal
solution :
root user login and run
chmod -R 755 /usr/lib/python2.7
fix this issue.
If pip is already installed and your unable to access it, one of the reason could be that you don't have permissions to read or execute the library. Try doing
sudo chmod -R u+rx /usr/lib/python2.7/site-packages/pip/
If pip is installed in a different folder, you can obtain the folder path by doing
>>> import pip
>>> pip.__path__
['/usr/lib/python2.7/site-packages/pip']
If you don't have root rights and running on python 2.6 then you can try this file https://bootstrap.pypa.io/2.6/get-pip.py (it is from same instruction you used, it is a simple python script which installs all dependencies and pip itself) and run it with command python get-pip.py --user

Categories

Resources