I am trying to install bluepy 1.0.5. However, I get receiving error below. Any idea how can i solve it? (I am using Mac OS X El Capitan)
40:449: execution error: The directory '/Users/isozyesil/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/isozyesil/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/95/f900ttf95g1b7h02y2_rtk400000gn/T/pycharm-packaging669/bluepy/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /var/folders/95/f900ttf95g1b7h02y2_rtk400000gn/T/pip-djih0T-record/install-record.txt --single-version-externally-managed --compile
failed with error code 1 in /private/var/folders/95/f900ttf95g1b7h02y2_rtk400000gn/T/pycharm-packaging669/bluepy/
(1)
You need to install libglib2.0-dev and python3-dev before:
sudo apt-get install libglib2.0-dev python3-dev
What part of the diagnostic message did you find unclear?
Did you consider ensuring writable self-owned files by doing sudo chown -R isozyesil /Users/isozyesil/Library/Caches/pip ?
Did you consider sudo pip install bluepy ?
For python 2.X this:
$ sudo apt-get install python-pip libglib2.0-dev
$ sudo pip install bluepy
to install dependencies and bluepy.
If you're intending to use it with python3.x use pip3 to install.
Related
I tried to install matplotlib ( third party lib) on gcp vm and failed.
gcp vm python documantation says use pip install -t lib/ <library_name> but actually, what they really mean: i.g. use pip install matplotlib -t lib/ <library_name> And it didn't work
I tried:
sudo pip install matplotlib -t env/gcplib
result:
"**Failed building wheel for subprocess32**"
"Command "/usr/bin/python -u -c "import setuptools,
tokenize;__file__='/tmp/pip-install-Rpkv8i/subprocess32/setup.py
';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __fi
le__, 'exec'))" install --record /tmp/pip-record-x4Y1E4/install-record.txt --single-version-externally-managed --co
mpile" **failed with error code 1** in /tmp/pip-install-Rpkv8i/subprocess32/"
I will very appreciate any help
Before attempting to install matplotlib, you need to install python-dev. You didn't mention what OS your VM was, but if it's Ubuntu, you would do that with:
sudo apt-get install python-dev
I have python 3.4 compiled from sources on my debian 7.8.
I have already installed some Python packages using pip and virtualenv (django, pillow etc), but i have an error installing python-phonenumbers (https://github.com/daviddrysdale/python-phonenumbers).
I tried it using virtualenv and without, running pip3 install phonenumbers and manually downloading archive and running python3 setup.py install. Every time I get same error:
Command "/usr/local/bin/python3.4 -c "import setuptools, tokenize;
__file__='/tmp/pip-build-ogsbxm_d/phonenumbers/setup.py';
exec(compile(getattr(tokenize, 'open', open)(__file__)
.read().replace('\r\n', '\n'), __file__, 'exec'))"
install --record /tmp/pip-98gunm55-record/install-record.txt
--single-version-externally-managed --compile"
failed with error code -9 in /tmp/pip-build-ogsbxm_d/phonenumbers
I tried it on my windows and ubuntu 14.04 - everything ok. How can i fix it?
For Ubuntu 14.04, from Docker image python:3.4.3-slim this combination worked for me:
sudo apt-get update
sudo apt-get install -y build-essential
sudo apt-get install -y python3.4-dev
sudo apt-get install -y libpq-dev
pip3 install psycopg2
Note build-essential package. It was crucial in my case. Maybe it will help you too.
I followed this link to install Gittle library. But when I run a command
$ pip install gittle
I get an error:
Command /usr/bin/python -c "import setuptools,
tokenize;__file__='/tmp/pip_build_victor
/gittle/setup.py';exec(compile(getattr(tokenize, 'open',
open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))"
install --record /tmp/pip-aoyPEt-record/install-record.txt
--single-version-externally- managed --compile failed with error code 1 in /tmp/pip_build_victor/gittle Storing debug log for failure in
/home/victor/.pip/pip.log
My Python version is 2.7.6.
You Need Root Privileges
Since you are installing sistem-wide libraries, these usually will be placed in directories which need root privileges for writing in them (for example anything under /usr/lib). Hence you need to either run the command as root:
# pip install gittle
Or you can use sudo:
$ sudo pip install gittle
What About Virtual Environments?
The more efficient/pythonic way to go about this would be using virtual environments. This is especially true if you are installing project-specific libraries, which will most probably not be required by other projects. Another classical application of virtual environments is when you are working on a machine on which you don't have root privileges, say at university for example.
Once you set up a virtual environment, if you place it in a directory on which you have writing rights, you can run:
$ pip install gittle
to install gittle in this case.
I made a program in Python3 which uses the package netifaces, I installed it with pip3 in two computers which had Ubuntu 13.04 and Ubuntu 13.10. However, I need to install it in other computer which has Ubuntu 12.04, and here I cannot install pip3 (python3-pip) because it is not on the repositories.
What I did was the next steps:
sudo aptitude install python3-setuptools
sudo easy_install3 pip
And then I had pip3 available. The problem is when I tried to install netifaces with pip3, which gives me next error:
error: command 'gcc' failed with exit status 1
Command /usr/bin/python3 -c "import setuptools, tokenize;__file__='/tmp/pip_build_root/netifaces/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-gkaftl-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_root/netifaces
Storing debug log for failure in /home/anubia/.pip/pip.log
If I install netifaces with pip or aptitude or apt-get the program does not recognise the library, because its documents are installed in python2 folders. I even tried to do a symbolic link from python3 folders to them, but it did not work.
Any ideas, please?
Solved!
I had to install the package python3-dev too, then the installation of netifaces from pip3 did not give me an error and now I can use it.
So the whole process (in my case) was:
sudo aptitude install python3-setuptools
sudo easy_install3 pip
sudo aptitude install python3-dev
sudo pip3 install netifaces
I'm running ubuntu on my computer and I'm trying to download requests.
However, when I do pip install requests it gives me an error:
writing manifest file 'requests.egg-info/SOURCES.txt'
running install_lib
creating /usr/local/lib/python2.7/dist-packages/requests
error: could not create '/usr/local/lib/python2.7/dist-packages/requests': Permission denied
----------------------------------------
Command /usr/bin/python -c "import setuptools;__file__='/home/alejandro/build/requests/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-tT3Boe-record/install-record.txt failed with error code 1
Does anyone have any tips on how to get past this or fix it?
Your error
could not create '/usr/local/lib/python2.7/dist-packages/requests': Permission denied
suggests that you tried to install the package system-wide as a regular user - which you don't have permission to do.
You can either install the package just for yourself with the --user option:
pip install --user requests
... or install it system-wide as root using sudo:
sudo pip install requests
Alternatively, you could look into using a virtual environment.