简体   繁体   中英

Error when trying to install Quandl module with pip

I tried to install the Python Quandl module with pip by running the following code in the cmd prompt:

C:\Users\zeke\Desktop\Python\python.exe -m pip install quandl

The module began to download and install until it reached an error message:

C:\Users\zeke>C:\Users\zeke\Desktop\Python\python.exe -m pip install quandl
Collecting quandl
  Using cached Quandl-3.0.1-py2.py3-none-any.whl
Collecting pyOpenSSL (from quandl)
  Downloading pyOpenSSL-16.1.0-py2.py3-none-any.whl (43kB)
    100% |################################| 51kB 1.8MB/s
Collecting ndg-httpsclient (from quandl)
  Using cached ndg_httpsclient-0.4.2.tar.gz
    Complete output from command python setup.py egg_info:
    running egg_info
    creating pip-egg-info\ndg_httpsclient.egg-info
    writing dependency_links to pip-egg-info\ndg_httpsclient.egg-info\dependency_links.txt
    writing pip-egg-info\ndg_httpsclient.egg-info\PKG-INFO
    writing entry points to pip-egg-info\ndg_httpsclient.egg-info\entry_points.txt
    writing requirements to pip-egg-info\ndg_httpsclient.egg-info\requires.txt
    writing top-level names to pip-egg-info\ndg_httpsclient.egg-info\top_level.txt
    writing namespace_packages to pip-egg-info\ndg_httpsclient.egg-info\namespace_packages.txt
    writing manifest file 'pip-egg-info\ndg_httpsclient.egg-info\SOURCES.txt'
    warning: manifest_maker: standard file '-c' not found

    error: [Errno 2] No such file or directory: 'C:\\Users\\zeke\\Desktop\\Python\\python35.zip\\lib2to3\\Grammar.txt'

----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\zeke\AppData\Local\Temp\pip-build-emddiyej\ndg-httpsclient\

I followed the file path 'C:\\Users\\zeke\\Desktop\\Python\\python35.zip\\lib2to3\\Grammar.txt' and the file completely exists. Why am I getting this error?

I was able to fix the issue by extracting .../Python/Python35.zip to a new directory within .../Python named 'Python35.zip'.

However now I am receiving errors when trying to import the module.

>>> import quandl
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\zeke\Desktop\Python\lib\site-packages\quandl\__init__.py", line 11, in <module>
    from .model.merged_dataset import MergedDataset
  File "C:\Users\zeke\Desktop\Python\lib\site-packages\quandl\model\merged_dataset.py", line 1, in <module>
    from more_itertools import unique_everseen
  File "C:\Users\zeke\Desktop\Python\lib\site-packages\more_itertools\__init__.py", line 1, in <module>
    from more_itertools.more import *
  File "C:\Users\zeke\Desktop\Python\lib\site-packages\more_itertools\more.py", line 162
    min_or_max = partial(max if reverse else min, key=lambda (a, b): a)
                                                         ^
SyntaxError: invalid syntax

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM