Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pyspark: pip install couldn't find a version

Tags:

pip

pyspark

I am trying to install the pyspark using pip install like below. But I got the following errors.

(python_virenv)edamame$ pip install pyspark
Collecting pyspark
  Could not find a version that satisfies the requirement pyspark (from versions: )
No matching distribution found for pyspark

Does anyone have any idea? Thanks!

like image 669
Edamame Avatar asked Jul 15 '16 23:07

Edamame


3 Answers

As of Spark 2.2, PySpark is now available in PyPI.

pip install pyspark


As of Spark 2.1, PySpark is pip installable but not yet from PyPI, which is under consideration for 2.2 in this ticket. To install PySpark you now just need download Spark 2.1+ and run setup.py:

cd spark-2.1/python/
pip install -e .

Big thanks to @Holden!

like image 160
Kamil Sindi Avatar answered Sep 18 '22 19:09

Kamil Sindi


pyspark is not in PyPI so you could not directly use pip install to install it.

Instead you could download a proper version of Spark here: http://spark.apache.org/downloads.html, and you will get a compressed TAR file. Then unpack it and pyspark is in its python folder.

To open the Python version of the Spark shell, you could go into your Spark directory and type:

bin/pyspark

or

bin\pyspark

in Windows.

like image 39
Burun Avatar answered Sep 17 '22 19:09

Burun


pyspark doesn't even exist in PyPI as you can see from https://pypi.python.org/pypi?%3Aaction=search&term=pyspark&submit=search, that's why pip is telling you it can't find it.

like image 20
edwinksl Avatar answered Sep 18 '22 19:09

edwinksl