在 Python 3.5 中安装 Pyproj 时出错
Error Installing Pyproj in Python 3.5
从最近几天开始,我正在尝试使用 pip 安装 python 的 pyproj 包。但是我收到下面引用的错误。我已经尝试了所有可用的相关解决方案,但无法安装。
提前致谢
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\**
试试这个
easy_install pyproj
或
sudo easy_install pyproj
或从 pyproj 下载 tar 文件并尝试 运行
pip install [path to downloaded tar file]
Pyproj 需要一个编译器(vcvarsall.bat
提示 Windows 中的 Visual C),您似乎没有安装它。我建议不要从源安装,而是下载 pre-compiled wheel and .
您需要 Python3.5
的开发工具
sudo apt-get update
sudo apt-get install python3.5-dev -y
pip install pyproj
如果使用Python3.6需要更新第二行。
从最近几天开始,我正在尝试使用 pip 安装 python 的 pyproj 包。但是我收到下面引用的错误。我已经尝试了所有可用的相关解决方案,但无法安装。 提前致谢
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\**
试试这个
easy_install pyproj
或
sudo easy_install pyproj
或从 pyproj 下载 tar 文件并尝试 运行
pip install [path to downloaded tar file]
Pyproj 需要一个编译器(vcvarsall.bat
提示 Windows 中的 Visual C),您似乎没有安装它。我建议不要从源安装,而是下载 pre-compiled wheel and
您需要 Python3.5
的开发工具sudo apt-get update
sudo apt-get install python3.5-dev -y
pip install pyproj
如果使用Python3.6需要更新第二行。