Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/319.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/oop/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
python anaconda-针对不同python版本的管理模块_Python_Anaconda_Aiohttp - Fatal编程技术网

python anaconda-针对不同python版本的管理模块

python anaconda-针对不同python版本的管理模块,python,anaconda,aiohttp,Python,Anaconda,Aiohttp,我在Anaconda的mac(2.7和3.5.1)中有两个版本的Python。每当我 pip install xxx 它将自动进入/anaconda/lib/python2.7/site packages文件夹。 现在我想学习aiohttp以及何时安装它 pip install aiohttp 它会给我一个错误: raise RUNTIMERROR(“aiohttp需要Python 3.4.1+”) 运行时错误:aiohttp需要Python 3.4.1+ -----------------

我在Anaconda的mac(2.7和3.5.1)中有两个版本的
Python
。每当我

pip install xxx
它将自动进入
/anaconda/lib/python2.7/site packages
文件夹。 现在我想学习
aiohttp
以及何时安装它

pip install aiohttp
它会给我一个错误:

raise RUNTIMERROR(“aiohttp需要Python 3.4.1+”) 运行时错误:aiohttp需要Python 3.4.1+

---------------------------------------- Command "python setup.py egg_info" failed with error code 1 in
/private/var/folders/c2/3yxfnvc51fng531jz3120000gn/T/pip-build-m_-mCpM/aiohttp/

  • 我如何解决这个问题
  • Anaconda
    中管理两个版本的
    Python
    的最佳方法是什么

  • 我刚刚找到了解决方案:

    python2   -m pip install SomePackage  # default Python 2
    python2.7 -m pip install SomePackage  # specifically Python 2.7
    python3   -m pip install SomePackage  # default Python 3
    python3.4 -m pip install SomePackage  # specifically Python 3.4
    

    从。

    我刚刚找到了解决方案:

    python2   -m pip install SomePackage  # default Python 2
    python2.7 -m pip install SomePackage  # specifically Python 2.7
    python3   -m pip install SomePackage  # default Python 3
    python3.4 -m pip install SomePackage  # specifically Python 3.4
    

    从。

    通常,您可以为正在进行的任何项目创建新的环境,使用您需要的任何python和包。在这个特定实例中,如果您想使用需要更高python的aiohttp,我将执行以下操作:

    conda create -n py35 python=3.5
    source activate py35
    pip install aiohttp
    

    这将在您的py35环境中安装aiohttp。

    一般来说,您可以使用所需的任何python和软件包为正在处理的任何项目创建新的环境。在这个特定实例中,如果您想使用需要更高python的aiohttp,我将执行以下操作:

    conda create -n py35 python=3.5
    source activate py35
    pip install aiohttp
    
    这将在py35环境中安装aiohttp。

    您可以使用该工具来管理您的环境(对于Python2/Python3)和软件包

    有关更多信息,请参阅

    您可以使用该工具来管理您的环境(对于Python2/Python3)和包


    有关更多信息,请参阅

    如果您有Anaconda,为什么要使用pip?另外,请尝试
    pip3安装aiohttp
    ,因为Anaconda没有
    aiohttp
    。不确定您为什么认为。。。你有没有试过安装conda?如果您有Anaconda,为什么要使用pip?另外,请尝试
    pip3安装aiohttp
    ,因为Anaconda没有
    aiohttp
    。不确定您为什么认为。。。你有没有试过安装conda?您还可以尝试:
    conda安装-c pypi aiohttp
    您也可以尝试:
    conda安装-c pypi aiohttp