SK Singh
SK Singh

Reputation: 163

Error Installing Pyproj in Python 3.5

From last couple of day, I am trying to install the pyproj package of python using pip. But I am getting the below quoted error. I have tried all the relevant solution available but was unable to install it. Thanks in Advance

C:\Users\ashujaimini\PycharmProjects\untitled1>pip install Pillow
Requirement already satisfied (use --upgrade to upgrade): Pillow in c:\users\ashujaimini\anaconda3\lib\site-packages

C:\Users\ashujaimini\PycharmProjects\untitled1>pip install pyproj
Collecting pyproj
  Using cached pyproj-1.9.5.1.tar.gz
    Complete output from command python setup.py egg_info:
    using bundled proj4..
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\ASHUJA~1\AppData\Local\Temp\pip-build-nwtkvc3t\pyproj\setup.py", line 72, in <module>
        objects = cc.compile(['nad2bin.c', 'src/pj_malloc.c'])
      File "c:\users\ashujaimini\anaconda3\lib\distutils\_msvccompiler.py", line 317, in compile
        self.initialize()
      File "c:\users\ashujaimini\anaconda3\lib\distutils\_msvccompiler.py", line 210, in initialize
        vc_env = _get_vc_env(plat_spec)
      File "c:\users\ashujaimini\anaconda3\lib\distutils\_msvccompiler.py", line 85, in _get_vc_env
        raise DistutilsPlatformError("Unable to find vcvarsall.bat")
    distutils.errors.DistutilsPlatformError: Unable to find vcvarsall.bat


**Command "python setup.py egg_info" failed with error code 1 in C:\Users\ASHUJA~1\AppData\Local\Temp\pip-build-nwtkvc3t\pyproj\**

Upvotes: 6

Views: 14196

Answers (3)

Sam Murphy
Sam Murphy

Reputation: 915

You need dev tools for Python3.5

sudo apt-get update
sudo apt-get install python3.5-dev -y 
pip install pyproj

if using Python3.6 need to update the second line.

Upvotes: 2

ojdo
ojdo

Reputation: 8900

Pyproj needs a compiler (vcvarsall.bat hints towards a Visual C in Windows), which you don't seem to have installed. Instead of installing from source, I suggest downloading a pre-compiled wheel and install the package from that.

Upvotes: 2

Arun G
Arun G

Reputation: 1688

Try this

easy_install pyproj

or

sudo easy_install pyproj

or download the tar file from pyproj and try to run

pip install [path to downloaded tar file]

Upvotes: 2

Related Questions