PIP
A tiny PHP application framework.
PIP - A tiny PHP application framework pip is a tiny php application framework built for people who use a lamp stack.
Is there a way to find all Python PyPI packages that were installed with easy_install or pip? I mean, excluding everything that was/is installed with the distributions tools (in this case apt-get on Debian).
Source: (StackOverflow)
It is possible to install NumPy with pip using pip install numpy
.
Is there a similar possibility with SciPy? (Doing pip install scipy
does not work.)
Update
The package SciPy is now available to be installed with pip
, so the question is not relevant anymore.
Source: (StackOverflow)
How should pip be installed on Windows?
Summary of the answers:
Depending on your Python version and whether you want to use it inside a virtual environment or not:
Starting from Python versions 2.7.9 and 3.4.0, pip
is already included in the regular install, see matth's answer below. Check if the path to the Scripts
directory inside your Python installation directory is contained in your system's PATH
environment variable, so pip
can be found.
A very straightforward approach (as of March 2014) for many other setups is to follow these instructions from pip.pypa.io, namely download get-pip.py and run python get-pip.py
(may require admin access). Note that pip.exe
will be placed inside your Python installation's Scripts folder, which is likely not on your path (fix that by running C:\PythonXX\Tools\Scripts\win_add2path.py
).
You can install and use pip inside a virtual environment. And again, if you install a recent Python 3.4
VENV
, pip will most likely already be included. If it is not available there, you can run python get-pip.py
inside the virtual environment, see above. See also thegauraw's answer below.
Alternative ways:
If you are an ActivePython user, see Rafe Kettler's answer below.
If you are a chocolatey user, which is an apt-get like packaging system on windows, you can try Martin Redola's answer here .
Source: (StackOverflow)
This is the error I get
(mysite)zjm1126@zjm1126-G41MT-S2:~/zjm_test/mysite$ pip install mysql-python
Downloading/unpacking mysql-python
Downloading MySQL-python-1.2.3.tar.gz (70Kb): 70Kb downloaded
Running setup.py egg_info for package mysql-python
sh: mysql_config: not found
Traceback (most recent call last):
File "<string>", line 14, in <module>
File "/home/zjm1126/zjm_test/mysite/build/mysql-python/setup.py", line 15, in <module>
metadata, options = get_config()
File "setup_posix.py", line 43, in get_config
libs = mysql_config("libs_r")
File "setup_posix.py", line 24, in mysql_config
raise EnvironmentError("%s not found" % (mysql_config.path,))
EnvironmentError: mysql_config not found
Complete output from command python setup.py egg_info:
sh: mysql_config: not found
Traceback (most recent call last):
File "<string>", line 14, in <module>
File "/home/zjm1126/zjm_test/mysite/build/mysql-python/setup.py", line 15, in <module>
metadata, options = get_config()
File "setup_posix.py", line 43, in get_config
libs = mysql_config("libs_r")
File "setup_posix.py", line 24, in mysql_config
raise EnvironmentError("%s not found" % (mysql_config.path,))
EnvironmentError: mysql_config not found
----------------------------------------
Command python setup.py egg_info failed with error code 1
Storing complete log in /home/zjm1126/.pip/pip.log
(mysite)zjm1126@zjm1126-G41MT-S2:~/zjm_test/mysite$ pip install mysql-python
Downloading/unpacking mysql-python
Running setup.py egg_info for package mysql-python
sh: mysql_config: not found
Traceback (most recent call last):
File "<string>", line 14, in <module>
File "/home/zjm1126/zjm_test/mysite/build/mysql-python/setup.py", line 15, in <module>
metadata, options = get_config()
File "setup_posix.py", line 43, in get_config
libs = mysql_config("libs_r")
File "setup_posix.py", line 24, in mysql_config
raise EnvironmentError("%s not found" % (mysql_config.path,))
EnvironmentError: mysql_config not found
Complete output from command python setup.py egg_info:
sh: mysql_config: not found
Traceback (most recent call last):
File "<string>", line 14, in <module>
File "/home/zjm1126/zjm_test/mysite/build/mysql-python/setup.py", line 15, in <module>
metadata, options = get_config()
File "setup_posix.py", line 43, in get_config
libs = mysql_config("libs_r")
File "setup_posix.py", line 24, in mysql_config
raise EnvironmentError("%s not found" % (mysql_config.path,))
EnvironmentError: mysql_config not found
----------------------------------------
Command python setup.py egg_info failed with error code 1
Storing complete log in /home/zjm1126/.pip/pip.log
What can I do to resolve this?
Source: (StackOverflow)
I am having trouble installing psycopg2. I get the following error when I try to pip install psycopg2
:
Error: pg_config executable not found.
Please add the directory containing pg_config to the PATH
or specify the full executable path with the option:
python setup.py build_ext --pg-config /path/to/pg_config build ...
or with the pg_config option in 'setup.cfg'.
----------------------------------------
Command python setup.py egg_info failed with error code 1 in /tmp/pip-build/psycopg2
But the problem is pg_config
is actually in my PATH
; it runs without any problem:
$ which pg_config
/usr/pgsql-9.1/bin/pg_config
I tried adding the pg_config path to the setup.cfg
file and building it using the source files I downloaded from their website (http://initd.org/psycopg/) and I get the following error message!
Error: Unable to find 'pg_config' file in '/usr/pgsql-9.1/bin/'
But it is actually THERE!!!
I am baffled by these errors. Can anyone help please?
By the way, I sudo
all the commands. Also I am on RHEL 5.5.
Source: (StackOverflow)
Is it possible? When installing pip
, install the python packages inside my $HOME
folder. (for example, I want to install mercurial
, using pip
, but inside $HOME
instead of /usr/local
)
I'm with a mac machine and just thought about this possibility, instead of "polluting" my /usr/local
, I would use my $HOME
instead.
PEP370 is exactly about this. Is just creating a ˜/.local
and do a pip install package
enough to make these packages to be installed only at my $HOME folder?
Source: (StackOverflow)
I find that recently often when I try to install a python package using pip, I get the error(s) below.
I found a reference online that one has to use "python2 setup.py install" from the download directory, and indeed find that this will then work if I manually find and download the package (from pypi).
But, I don't know where pip is downloading packages to, and/or why it is failing in this manner.
I tried to do a pip upgrade, but it also failed in a similar manner, with a bunch of "Unknown distribution option" errors (entry_points, zip_safe, test_suite, tests_require)!
- pip 1.0.1
- activePython 2.7
Trying to use ActiveState's pypm fails because they have a smaller library base and it doesn't include these packages.
C:\test>pip install requests-oauth
Downloading/unpacking requests-oauth
Downloading requests-oauth-0.4.1.tar.gz
Running setup.py egg_info for package requests-oauth
E:\Plang\ActivePython\lib\distutils\dist.py:267: UserWarning: Unknown distribution option: 'zip_safe'
warnings.warn(msg)
E:\Plang\ActivePython\lib\distutils\dist.py:267: UserWarning: Unknown distribution option: 'install_requires'
warnings.warn(msg)
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help
error: invalid command 'egg_info'
Complete output from command python setup.py egg_info:
E:\Plang\ActivePython\lib\distutils\dist.py:267: UserWarning: Unknown distribution option: 'zip_safe'
warnings.warn(msg)
E:\Plang\ActivePython\lib\distutils\dist.py:267: UserWarning: Unknown distribution option: 'install_requires'
warnings.warn(msg)
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help
error: invalid command 'egg_info'
Source: (StackOverflow)
I spent most of the day yesterday searching for a clear answer for installing pip. I can't find a good solution.
Can somebody help me install it?
Source: (StackOverflow)
I tried to install the Python package dulwich:
pip install dulwich
But I get a cryptic error message:
error: Unable to find vcvarsall.bat
The same happens if I try installing the package manually:
> python setup.py install
running build_ext
building 'dulwich._objects' extension
error: Unable to find vcvarsall.bat
Source: (StackOverflow)
A tweet reads:
Don't use easy_install, unless you
like stabbing yourself in the face.
Use pip.
Why use pip over easy_install? Doesn't the fault lie with PyPI and package authors mostly? If an author uploads crap source tarball (eg: missing files, no setup.py) to PyPI, then both pip and easy_install will fail. Other than cosmetic differences, why do Python people (like in the above tweet) seem to strongly favor pip over easy_install?
(Let's assume that we're talking about easy_install from the Distribute package, that is maintained by the community)
Source: (StackOverflow)
Given the name of a Python (2.X) package that can be installed with pip and virtualenv, is there any way to find out a list of all the possible versions of it that pip could install? Right now it's trail and error.
I'm trying to install a version for a 3rd party library, but the newest version is too new, there were backwards incompatible changes made. So I'd like to somehow have a list of all the versions that pip knows about, so that I can test them.
Source: (StackOverflow)
I would like to get a list of Python modules, which are in my Python installation (UNIX server).
How can you get a list of Python modules installed in your computer?
Source: (StackOverflow)
Is there any way to make pip
play well with multiple versions of Python? For example, I want to use pip
to explicitly install things to either my site 2.5 installation or my site 2.6 installation.
For example, with easy_install
, I use easy_install-2.{5,6}
.
And, yes — I know about virtualenv, and no — it's not a solution to this particular problem.
Source: (StackOverflow)
I get the following error when attempting to install psycopg2
via pip on Mavericks 10.9:
clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]
Not sure how to proceed and have searched here and elsewhere for this particular error. Any help is much appreciated!
Here is the complete output from pip:
$ pip install psycopg2
Downloading/unpacking psycopg2
Downloading psycopg2-2.5.2.tar.gz (685kB): 685kB downloaded
Running setup.py (path:/private/var/folders/0z/ljjwsjmn4v9_zwm81vhxj69m0000gn/T/pip_build_tino/psycopg2/setup.py) egg_info for package psycopg2
Installing collected packages: psycopg2
Running setup.py install for psycopg2
building 'psycopg2._psycopg' extension
cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.5.2 (dt dec pq3 ext)" -DPG_VERSION_HEX=0x090303 -DPSYCOPG_EXTENSIONS=1 -DPSYCOPG_NEW_BOOLEAN=1 -DHAVE_PQFREEMEM=1 -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I. -I/usr/local/Cellar/postgresql/9.3.3/include -I/usr/local/Cellar/postgresql/9.3.3/include/server -c psycopg/psycopgmodule.c -o build/temp.macosx-10.9-intel-2.7/psycopg/psycopgmodule.o
clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
error: command 'cc' failed with exit status 1
Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/private/var/folders/0z/ljjwsjmn4v9_zwm81vhxj69m0000gn/T/pip_build_tino/psycopg2/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/0z/ljjwsjmn4v9_zwm81vhxj69m0000gn/T/pip-bnWiwB-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.macosx-10.9-intel-2.7
creating build/lib.macosx-10.9-intel-2.7/psycopg2
copying lib/__init__.py -> build/lib.macosx-10.9-intel-2.7/psycopg2
copying lib/_json.py -> build/lib.macosx-10.9-intel-2.7/psycopg2
copying lib/_range.py -> build/lib.macosx-10.9-intel-2.7/psycopg2
copying lib/errorcodes.py -> build/lib.macosx-10.9-intel-2.7/psycopg2
copying lib/extensions.py -> build/lib.macosx-10.9-intel-2.7/psycopg2
copying lib/extras.py -> build/lib.macosx-10.9-intel-2.7/psycopg2
copying lib/pool.py -> build/lib.macosx-10.9-intel-2.7/psycopg2
copying lib/psycopg1.py -> build/lib.macosx-10.9-intel-2.7/psycopg2
copying lib/tz.py -> build/lib.macosx-10.9-intel-2.7/psycopg2
creating build/lib.macosx-10.9-intel-2.7/psycopg2/tests
copying tests/__init__.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests
copying tests/dbapi20.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests
copying tests/dbapi20_tpc.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests
copying tests/test_async.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests
copying tests/test_bug_gc.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests
copying tests/test_bugX000.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests
copying tests/test_cancel.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests
copying tests/test_connection.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests
copying tests/test_copy.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests
copying tests/test_cursor.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests
copying tests/test_dates.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests
copying tests/test_extras_dictcursor.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests
copying tests/test_green.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests
copying tests/test_lobject.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests
copying tests/test_module.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests
copying tests/test_notify.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests
copying tests/test_psycopg2_dbapi20.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests
copying tests/test_quote.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests
copying tests/test_transaction.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests
copying tests/test_types_basic.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests
copying tests/test_types_extras.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests
copying tests/test_with.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests
copying tests/testconfig.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests
copying tests/testutils.py -> build/lib.macosx-10.9-intel-2.7/psycopg2/tests
running build_ext
building 'psycopg2._psycopg' extension
creating build/temp.macosx-10.9-intel-2.7
creating build/temp.macosx-10.9-intel-2.7/psycopg
cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.5.2 (dt dec pq3 ext)" -DPG_VERSION_HEX=0x090303 -DPSYCOPG_EXTENSIONS=1 -DPSYCOPG_NEW_BOOLEAN=1 -DHAVE_PQFREEMEM=1 -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I. -I/usr/local/Cellar/postgresql/9.3.3/include -I/usr/local/Cellar/postgresql/9.3.3/include/server -c psycopg/psycopgmodule.c -o build/temp.macosx-10.9-intel-2.7/psycopg/psycopgmodule.o
clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
error: command 'cc' failed with exit status 1
----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/private/var/folders/0z/ljjwsjmn4v9_zwm81vhxj69m0000gn/T/pip_build_tino/psycopg2/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/0z/ljjwsjmn4v9_zwm81vhxj69m0000gn/T/pip-bnWiwB-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/var/folders/0z/ljjwsjmn4v9_zwm81vhxj69m0000gn/T/pip_build_tino/psycopg2
Source: (StackOverflow)