我在Windows 10上使用Anaconda。某些软件包无法进行conda安装,因此我求助于Anaconda中的pip安装。最近,我遇到了一些我无法在根环境中安装的数字,但让我们以googleads为例。我都尝试过:
pip install googleads
pip install git+git://github.com/googleads/googleads-python-lib
在conda终端上,它们都给我相同的错误-粘贴在下面。我发现我可以 将其安装在虚拟环境中,而不是根环境中。有人知道如何解决这个问题吗?
我尝试将这一行添加到bash_profile的末尾:
export PIP_REQUIRE_VIRTUALENV=false
如此处的建议:Unable to pip install packages in Anaconda,但没有任何区别。
好的,出现错误消息:
Collecting googleads
Using cached
https://files.pythonhosted.org/packages/55/5b/397c2ca6ffe116732261d6bd74be9db91f1b1a65916f8525be9a7dfcc3dc/googleads-12.2.0.tar.gz
Collecting google-auth<2.0.0,>=1.0.0 (from googleads)
Using cached https://files.pythonhosted.org/packages/53/06/6e6d5bfa4d23ee40efd772d6b681a7afecd859a9176e564b8c329382370f/google_auth-1.5.0-py2.py3-none-any.whl
Collecting google-auth-oauthlib<1.0.0,>=0.0.1 (from googleads)
Using cached https://files.pythonhosted.org/packages/46/df/d1f94ee2cffe5a83721f262efe51f3b2dcdd3b616caf007b8490e824c550/google_auth_oauthlib-0.2.0-py2.py3-none-any.whl
Requirement already satisfied: pytz>=2015.7 in c:\users\tomwagstaff\anaconda3\lib\site-packages (from googleads) (2018.4)
Exception:
Traceback (most recent call last):
File "C:\Users\TomWagstaff\Anaconda3\lib\site-packages\pip\_internal\basecommand.py", line 228, in main
status = self.run(options, args)
File "C:\Users\TomWagstaff\Anaconda3\lib\site-packages\pip\_internal\commands\install.py", line 291, in run
resolver.resolve(requirement_set)
File "C:\Users\TomWagstaff\Anaconda3\lib\site-packages\pip\_internal\resolve.py", line 103, in resolve
self._resolve_one(requirement_set, req)
File "C:\Users\TomWagstaff\Anaconda3\lib\site-packages\pip\_internal\resolve.py", line 262, in _resolve_one
check_dist_requires_python(dist)
File "C:\Users\TomWagstaff\Anaconda3\lib\site-packages\pip\_internal\utils\packaging.py", line 46, in check_dist_requires_python
feed_parser.feed(metadata)
File "C:\Users\TomWagstaff\Anaconda3\lib\email\feedparser.py", line 175, in feed
self._input.push(data)
File "C:\Users\TomWagstaff\Anaconda3\lib\email\feedparser.py", line 103, in push
self._partial.write(data)
TypeError: string argument expected, got 'NoneType'