简体   繁体   English

当已经在C:\\ path \\ Anaconda3 \\…中安装软件包时,如何为C:\\ Python27安装软件包(或使用现有软件包)?

[英]How to install packages (or use existing packages) for C:\Python27 when these are already installed in C:\path\Anaconda3\…?

Please consider: I am not a CS-person, and have limited experience with path variables, global environments etc. However, please let me know if my problem can be fixed by adding a new path variable for Python27. 请考虑:我不是CS专家,并且对路径变量,全局环境等经验有限。但是,请告诉我是否可以通过为Python27添加新的路径变量来解决我的问题。 BTW, I am using Windows10. 顺便说一句,我正在使用Windows10。

On my PC I have Anaconda downloaded with python3, Jupyter, spyder etc... 在我的PC上,我下载了带有python3,Jupyter,spyder等的Anaconda ...

Anaconda is convenient and the CMD-command "python" will start Anaconda很方便,并且CMD命令“ python”将启动

Python 3.6.0 | Python 3.6.0 | Anaconda 4.3.1 水蟒4.3.1

Running Python36 is not a problem, and the Anaconda distribution contains everything I need for using Python. 运行Python36没问题,Anaconda发行版包含使用Python所需的一切。 However, I would also like to be able to import (or use existing) packages for the Python27 interpreter which I have downloaded independently from the python.org site. 但是,我也希望能够为我从python.org网站独立下载的Python27解释器导入(或使用现有的)软件包。 Running the command 运行命令

(CMD) > pip install scipy 

returns 回报

Requirement already satisfied: scipy in c:\path\anaconda3\lib\site-packages

Running the command in Python27 在Python27中运行命令

>>> from scipy import *

returns 回报

ImportError: No module named scipy

Please understand my problem: I wish to keep my Anaconda - python 3x distribution, but in addition I would also like to be able to use python 2x in full extent (all packages) 请理解我的问题:我希望保留我的Anaconda-python 3x发行版,但是除此之外,我还希望能够在全部范围内使用python 2x(所有软件包)

Here I am going to share what I have done to install scipy . 在这里,我将分享我安装scipy所做的工作。

MY PC Configuration is windows-7 64-bit & python 2.7 我的电脑配置为windows-7 64-bit & python 2.7

  • First I download the required packages form http://www.lfd.uci.edu/~gohlke/pythonlibs/ (which version match your configuration EX: cp27==>python2.7 & cp36==>3.6) 首先,我从http://www.lfd.uci.edu/~gohlke/pythonlibs/下载了所需的软件包(该版本与您的配置匹配:EX:cp27 ==> python2.7&cp36 ==> 3.6)
  • Second I extract the file using 7zip (also can be used any zipper like winrar) 其次,我使用7zip压缩文件(也可以使用任何拉链,例如winrar)
  • Third I copy the scipy folder which I extracted and paste it into C:\\Python27\\Lib\\site-packages (or put it where the exact location is in your PC like ..\\..\\Lib\\site-packages ) 第三,我复制提取的scipy文件夹并将其粘贴到C:\\Python27\\Lib\\site-packages (或将其放置在PC中确切的位置,如..\\..\\Lib\\site-packages

NOTE: Have to install numpy first before installing scipy in this same way. 注意:必须安装numpy的 first以同样的方式安装SciPy的面前。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 安装Py包(Scipy)时,注册表指向错误的python路径(C:\\ Python27 \\ ArcGIS)而不是(C:\\ Python27) - Registry points to wrong python path(C:\Python27\ArcGIS) instead of (C:\Python27) when installing a Py Package(Scipy) 如何将“ C:\\ Users \\ Myname \\ Anaconda3 \\ envs \\ pytorch \\ lib \\ site-packages”之类的路径永久添加到sys.path? - How to add a path like “C:\Users\Myname\Anaconda3\envs\pytorch\lib\site-packages” to sys.path permanently? 如何配置 Pycharm 以使用 Anaconda 中已安装的软件包? - How to configure Pycharm to use packages already installed in Anaconda? Windows 10上Anaconda3如何获取安装包的权限? - How do obtain permissions to install packages for Anaconda3 on Windows 10? 在Windows 8中将C:\\ Python27 \\ Scripts添加到路径 - Add C:\Python27\Scripts to path in Windows 8 包安装在anaconda但不安装在python中 - Packages installed in anaconda but not in python 从 C++ 调用 Python 并访问通过 Anaconda 安装的包 - Calling Python from C++ and accessing packages installed via Anaconda 在anaconda中安装python包 - Install python packages in anaconda 如何在MacOS上为python27安装jsonrpc - how install jsonrpc on macos for python27 如何为python27安装请求库 - How to install request library for python27
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM