How do I install a package with pip in editable mode and also not install its dependencies?
I tried both --no-deps and --no-dependencies:
$ pip install -e --no-deps .
ERROR: --no-deps is not a valid editable requirement. It should
either be a path to a local project or a VCS URL (beginning with svn+,
git+, hg+, or bzr+).
$ pip install -e --no-dependencies .
ERROR: --no-dependencies is not a valid editable requirement. It should
either be a path to a local project or a VCS URL (beginning with svn+,
git+, hg+, or bzr+).
but I always get an error.
Leaving out -e or --no-deps works:
$ pip install -e .
$ pip install --no-deps .
pip is a little quirky here. You have to have the --no-deps option before the -e option:
pip install --no-deps -e .
The docs technically list -e separately from the "options".
I am using pip in a cygwin environment under Win10.
$ pip --version
pip 9.0.1 from c:\python36\lib\site-packages (python 3.6)
I had coded a bash function molt to do python package maintenance in the past
molt () {
local i
for i in $(pip list | cut -d' ' -f1)
do
case $i in
pip|pywin32)
continue
;;
*)
pip install -qU $i
;;
esac
done
}
It worked until last week.
$ molt
Command "python setup.py egg_info" failed with error code 1 in C:\cygwin64\tmp\pip-build-lbe5xcu8\Package\
Usage:
pip install [options] <requirement specifier> [package-index-options] ...
pip install [options] -r <requirements file> [package-index-options] ...
pip install [options] [-e] <vcs project url> ...
pip install [options] [-e] <local project path> ...
pip install [options] <archive url/path> ...
no such option: --------------
I suspect pip must have changed but couldn't figure out what change broke the code. Please help.
It turned out that pip list returns
Package Version
-------------- -------
pip 9.0.1
setuptools 38.5.2
which leads pip install -qU Package -------------- according to the molt function, causing the error. The culprit is the new pip list output format (I forgot that I have changed the default legacy to columns a while ago). Restoring the default format option fixes the error, i.e.,
pip list --format=legacy
I am new to python learning.I need to install pip on python2.6. From pip website, I downloaded "pip-9.0.1-py2.py3-none-any.whl" package but by which command I will install it.
I also tried the following option but not succeeded.
bash-3.2# apt install python-pip
apt: invalid flag: install
From OpenCSW:
pkgadd -d http://get.opencsw.org/now
/opt/csw/bin/pkgutil -U
/opt/csw/bin/pkgutil -y -i py_pip
/usr/sbin/pkgchk -L CSWpy-pip # list files
Don't forget to install python27 as well.
I tried to follow this tutorial.
This is what I did in the console:
pip3 install --user --upgrade awscli
after that, when I write:
pip3 --version
I'm getting:
pip 9.0.1 from /Users/user/Library/Python/3.4/lib/python/site-packages (python 3.4)
then I wrote:
pip3 install --user --upgrade awscli
this command downloaded awscli and automatically added this:
# Setting PATH for Python 3.4
# The orginal version is saved in .profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.4/bin:${PATH}"
export PATH
to my .profile
Later on, just to be sure, I wrote:
source ~/.profile
and then when I type:
user$ aws
-bash: aws: command not found
I restarted the terminal with no luck also.
What's the problem here?
Here are the two steps to install AWS cli on mac OSX
FIRST
Offical version
brew install awscli
SECOND
Development version
brew install awscli --HEAD
When "pip3 install" is called with the "--user" option, it installs the aws executable in a user-specific location. This can be one of many possible locations, but the best way to find out where is with this command:
python3 -m site --user-base
On my system, this returned:
/Users/[myusername]/Library/Python/3.6
This directory has a "bin" subdirectory, and that is where the "aws" executable was located.
I figured this out from following:
pip3 install --help
https://docs.python.org/3/library/site.html#module-contents
Simple do these three steps:
curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"
unzip awscli-bundle.zip
sudo ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws
brew install awscli should work
This is what worked for me, I experienced permission issues and had to create a local Frameworks folder first before running brew install. using macOS High Sierra
sudo mkdir /usr/local/Frameworks
sudo chown $(whoami):admin /usr/local/Frameworks
brew install awscli
To answer the original question about installing using pip:
sudo pip install --upgrade pip
sudo easy_install nose
sudo easy_install tornado
sudo easy_install six
sudo pip install --ignore-installed awscli
worked for me on Mojave
I had similar error, when trying to install awscli. I was following steps mentioned here by amazon [https://docs.aws.amazon.com/cli/latest/userguide/cli-install-macos.html]
I use anaconda, so when I was using pip3 install awscli --upgrade --user
it installs awscli in /Users/username/.local/lib/python3.6/
So, I used following to update awscli to anaconda-
conda install -c conda-forge awscli
I have used the following commands to install awscli :
$ curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"
$ unzip awscli-bundle.zip
$ ./awscli-bundle/install -b ~/bin/aws
check version using : /Users/xxx/bin/aws --version
configure using : /Users/xxx/bin/aws configure
Was facing a similar issue. Resolved it by installing python 3.9 using brew install.
brew install python#3.9
Then reinstall awscli
I followed the below steps and it works for MacOS 10.11
curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"
Unzip the package.
unzip awscli-bundle.zip
And instead of given command:
'sudo /usr/local/bin/python2.7 awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws'
which is broken due to pip, I think, I used the below command and it worked for me.
python3.6 ./awscli-bundle/install -b ~/bin/aws
Using pip install on some large package doesn't show any progress report while downloading.
Using the -v, --verbose option doesn't do it and there doesn't seem to be any other relevant option.
At least pip9 has -v option which prints debug msg during installation of the package.
$ pip --version
pip 9.0.1
Help:
$ pip install --help
..
..
-v, --verbose Give more output. Option is additive, and can be used up to 3 times.
Usage:
pip install -r requirements.txt -vvv
Seems that pip needs a --log argument to echo to the screen, e.g.:
$ pip -v --log /tmp/pip.log install $python_pkg --upgrade