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.
Related
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..
I installed python 3x via home brew, the process was successful.
However when I check version, it shows 2x
here is the terminal output
➜ ~ brew install python
Warning: python 3.7.2 is already installed, it's just not linked
You can use `brew link python` to link this version.
➜ ~ brew link python
Linking /usr/local/Cellar/python/3.7.2... Error: Permission denied # dir_s_mkdir - /usr/local/Frameworks
➜ ~ sudo brew link python
Error: Running Homebrew as root is extremely dangerous and no longer supported.
As Homebrew does not drop privileges on installation you would be giving all
build scripts full access to your system.
➜ ~ python -V
Python 2.7.10
I think I need to modify some kind of path. And do some magic then pray...lol
Anyway anyone know how to get this work on my machine? I'm mac latest
First, solve your permission problem by running the official command from the Homebrew Documentation, Troubleshooting page
cd /usr/local && sudo chown -R $(whoami) bin etc include lib sbin share var opt Cellar Caskroom Frameworks
Then run brew link python
And finally run echo $PATH and check that your /usr/local/bin has precedence over other directories.
you could do brew uninstall python3 and install it from the python website here https://www.python.org/
When you go install a module you do pip3 install packageName
And when you run a program you could run it from your IDE (I recommend VSCode) or run it from the terminal with python3 drag_python_file_here
you have to use python3 instead of python on Mac so like python3 path/to/file.py and pip is now pip3 so like pip3 install pillow
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.
I have tried loading up the software center in order to install some packages but it doesn't seem to open. I tried entering the following command in terminal:
software-center
and get the following error:
bash: /usr/bin/software-center: /usr/bin/python: bad interpreter: Permission denied
Try this out, killall snap-store then relaunch the app
Try this, worked for me sudo apt install gnome-software
Turns out some default package files for python were missing:
sudo apt-get -m --reinstall install python python-minimal dh-python
sudo apt-get -f install
Using ubuntu 20.04 with default configurations means you should ignore answers prompting you to explore gnome-software adjustments. This version uses the snap-store to manage applications. This worked for me.
$ killall snap-store
$ snap-store
I'm trying to install UltiSnips in different way but the same message appears each time when I launch vim.
Python 2.7 is installed but it seems that vim has been installed before the 2.7 version.
I tryed to reinstall vim using this link:
$ sudo apt-get install mercurial libssl-dev
$ sudo apt-get build-dep vim
$ hg clone http://hg.debian.org/hg/pkg-vim/vim
$ cd vim
$ hg checkout unstable
$ debian/rules update-orig
$ dpkg-buildpackage -i -I
$ cd ..
But the same problem remains.
Thanks
You don't provide much information to help. You can check whether your Vim has Python via :py print "yes". For the Python version, check the :version output. It will contain something like -lpython2.7.
When you compile Vim yourself, you need to enable the Python integration by passing ./configure --enable-pythoninterp.
I had the same problem with NeoVim on Ubuntu. Running :CheckHealth pointed me into the right direction. Creating the following softlink solved the problem for me:
sudo ln -s /usr/bin/python /usr/local/bin/python
Maybe obvious to most, but not to me was the fact that the neovim module had to be installed. On ubuntu, installing it using pip did the trick for me:
sudo pip3 install neovim
To install the module for python 3, I suppose pip3 has to exchanged for pip for python 2.
Download the source code from http://www.vim.org/.
Then
cd vim
make clean
./configure --prefix=/opt/local --with-features=huge --enable-pythoninterp=yes --enable-multibyte --with-vim-name=vim --with-python-config-dir=/usr/lib/python2.7/config-x86_64-linux-gnu
make
sudo make install
I had the same problem after installing UltiSnips, my simple solution was to type inside vim :version where python3 wasn't install. I solve this installing vim-gtk3, try sudo apt install vim-gtk3 after installing gtk3 the message disapper and my vim launches normally ;)