opengv installation not in pip3 list - python-3.x

I have a question. I followed the http://laurentkneip.github.io/opengv/
installation manual. And i did correct the path by using the command
cmake ../opengv -DBUILD_PYTHON=ON -DPYBIND11_PYTHON_VERSION=3.7 -DPYTHON_INSTALL_DIR=/usr/local/lib/python3.7/dist-packages/
and I also ran the command
sudo ln -s /usr/local/lib/python3.7/dist-packages/pyopengv.cpython-37m-x86_64-linux-gnu.so
to bring the built package in the opengv/build/lib to the python3-package....
But I really have no idea why!! There is no opengv in the pip3 list???
The final problem was that I can not import pyopengv in openSFM...
But the first problem is I think is because there is no opengv in pip3 list..

Related

Having issues installing/running tf2onnx

I'm trying to get Tf2onnx to run so that I can convert a saved_model.pb file to onnx format. Nothing is really working out. I have tried installing it with the pip install git+https://github.com/onnx/tensorflow-onnx command but same issue.
The command should be issued from the site-packages directory, not the tf2onnx directory. I also put a sudo in front which helped.
sudo python3 -m tf2onnx.convert --saved-model /home/isaacpadberg/Desktop/model --output model.onnx

csvkit in2csv command not working

I followed installment instructions mentioned here
Its a simple pip install command
After that I went to my linux terminal and wrote in2csvbut got the following error:
/usr/bin/in2csv: No such file or directory
Originally I tried to install it using the command:
sudo apt-get install python3-csvkit
And the in2csv command used to work on terminal, but it appears to work under python 3 installation and I need it under my python2.7.
so I uninstalled the python3-csvkit, and installed it again using pip install, but again its not working from terminal, this way.
Any ideas why, and how to solve it?
in2csv command manual: here
I just had this problem and solved with:
sudo pip install csvkit
Without the sudo pip installs csvkit in /home/username/.local/lib/python2.7/site-packages and probably puts the executable in /home/username/.local/bin. You could avoid the sudo by adding that to your shell PATH.

Can't find Python.h when compiling PyCaffe on Ubuntu 14.04

I'm trying to install PyCaffe for Python 3.5.3 on AWS EC2 with Ubuntu 14.04 without Anaconda, following the installation instructions.
I successfully compiled it on the same machine for Python 2.7 but when compiling for version 3.5 I get the following error:
ubuntu#ip-172-31-3-227:~/caffe$ make pycaffe
CXX/LD -o python/caffe/_caffe.so python/caffe/_caffe.cpp
python/caffe/_caffe.cpp:1:52: fatal error: Python.h: No such file or directory
#include <Python.h> // NOLINT(build/include_alpha)
I saw this post and performed:
sudo apt-get install python3-dev
I found this, so I performed the equivalent command for Python 3.5:
for req in $(cat requirements.txt); do sudo pip3.5 install $req; done
All installations worked but it didn't fix the problem.
I many other posts on similar problems but not this exact problem (so if you find something please check that it's really the same situation before rushing to say I didn't look well enough).
P.S.
I also saw this post but I don't understand which directories to add to the path.
When you do a pip install package,when pip finds new version,it uninstall the current one(dateutil in your case) when the package was installed using certain permission,pip needs the same permission to uninstall/upgrade it.
A quick fix would be to change this
`for req in $(cat requirements.txt); do pip3.5 install $req; done` to
for req in $(cat requirements.txt); do sudo pip3.5 install $req; done
It seems you dont have permission to access /usr/local/lib/python3.5/ folder as user,the packages that goes in /usr/local are required by the system but only available to you and only you on the system, i assume since only only they are restricted to you and pip want to access assuming that no restriction is there,then it get permission denied ,so you might consider doing
for req in $(cat requirements.txt); do pip3.5 --user yourusername install $req; done
the alternative is to remove any restriction to execute and write on that folder
by doing chmod -R 777 /usr/local/lib/python3.5/ which is usually not recommended but the problem you need pip to be able to read,write,execute anything in that folder.

google-cloud-sdk installation not finding right Python 2.7 version in CentOS /usr/local/bin

Our server OS is CentOS 6.8, I was trying to install google-cloud-sdk, even though I installed
python 2.7 in /usr/local/bin
, it is still looking at old version of
python 2.6 in /usr/bin
. I tried giving export PATH=/usr/local/bin:$PATH to first look at /usr/local/bin than /usr/bin but still the problem persists. please suggest a way to fix.
The way I have solved this (and I know it works) is to first install Python 2.7 in whatever way you'd like, then install pip using Python 2.7 which will give you pip2.7. You can then use pip2.7 to install the google_compute_engine module so that it ends up in the right modules folder.
# get pip2.7
wget https://bootstrap.pypa.io/get-pip.py
python2.7 get-pip.py
# install the gcloud module
pip2.7 install google_compute_engine
You can then add this to your $HOME/.bashrc
export CLOUDSDK_PYTHON=/usr/local/bin/python2.7
This is the best repeatable way I know of
Go to the google-cloud-sdk folder and open the install.sh file.
Change the CLOUDSDK_PYTHON="python" value to CLOUDSDK_PYTHON="python2.7"
Rerun the install with the command:
./install.sh
Or you could install it using yum:
https://cloud.google.com/sdk/downloads#yum
If you are on Windows This is a simple solution that worked for me:
open Powershell as administrator and run this to add your Python folder to your environment's PATH:
$env:Path += ";C:\python27_x64\"
Then re-run the command that gave you the original error. It should work fine.
Alternatively you could run that original (error-causing) command within the Cloud SDK Shell. That also worked for me.
I found a CLOUDSDK_PYTHON inside my ~/.bash_profile (or ~/.zshenv).
I removed it, and went back into my google-cloud-sdk directory and reinstalled it.
./install.sh
This fixed the issue for me.

Installing wxPython in virtualenv under Linux

I am trying to set up a wxpython inside virtualenv.
As detailed in many places, the easy_install / pip install dosent work as setup.py is not present.
I cam across a description on how to set it up on a Mac, but found no such methods for Linux.
How can this be done on Linux ?
My actual use case is a little experimental. I am trying to get a django project call a wxpython app. This works outside of virtualenv, but the import fails as wx is not installed in virtualenv.
Thanks for the help in advance.
On Ubuntu 12.04 the following worked for me:
cd <env>/lib/python-2.7/site-packages
ln -s /usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/ .
ln -s /usr/lib/python2.7/dist-packages/wx.pth .
ln -s /usr/lib/python2.7/dist-packages/wxversion.py .
ln -s /usr/lib/python2.7/dist-packages/wxversion.pyc .
have you tried building it from source? it used to be a long process, but it looks like it's been improved recently. the instructions are at http://www.wxpython.org/builddoc.php and include the ability to specify an install directory. it builds fine on linux in my experience, once you have the dependencies installed.

Resources