Windows에서 Python의 "easy_install"을 사용하는 방법… 쉽지 않습니다.
수동으로 다음, Windows XP에서 파이썬 2.7 설치를 설정 한 후 %PATH%
에 python.exe
(왜 이렇게 설치? 파이썬이되지 않습니다), 다음 설치 setuptools 0.6c11
(이렇게 설치? 파이썬을하지 않는 이유), 수동으로 설정 %PATH%
에 easy_install.exe
(왜 아무튼 ' 설치 프로그램이이 작업을 수행 T?), 나는 마지막으로 파이썬 패키지를 설치하려고 easy_install
하지만, easy_install
그것은 종속되는 pywin32 패키지를 설치할 수 없을 때 실패했습니다. easy_install이 Windows XP에서 제대로 작동하도록하려면 어떻게해야합니까? 실패는 다음과 같습니다.
C : \> easy_install winpexpect winpexpect 검색 베스트 매치 : winpexpect 1.4 winpexpect-1.4-py2.7.egg 처리 winpexpect 1.4는 이미 easy-install.pth의 활성 버전입니다. c : \ python27 \ lib \ site-packages \ winpexpect-1.4-py2.7.egg 사용 winpexpect에 대한 종속성 처리 pywin32> = 214 검색 http://pypi.python.org/simple/pywin32/ 읽기 http://sf.net/projects/pywin32 읽기 http://sourceforge.net/project/showfiles.php?group_id=78018 읽기 pywin32> = 214에 대한 로컬 패키지 또는 다운로드 링크가 없습니다. 베스트 매치 : 없음 역 추적 (가장 최근 호출 마지막) : 파일 "C : \ python27 \ scripts \ easy_install-script.py", 8 행, load_entry_point ( 'setuptools == 0.6c11', 'console_scripts', 'easy_install') () 파일 "C : \ python27 \ lib \ site-packages \ setuptools \ command \ easy_install.py", 1712 행, 기본 with_ei_usage (람다 : with_ei_usage의 파일 "C : \ python27 \ lib \ site-packages \ setuptools \ command \ easy_install.py", 1700 행 반환 f () 파일 "C : \ python27 \ lib \ site-packages \ setuptools \ command \ easy_install.py", 줄 1716, distclass = DistributionWithoutHelpCommands, ** kw 파일 "C : \ python27 \ lib \ distutils \ core.py", 152 행, 설정 dist.run_commands () run_commands의 파일 "C : \ python27 \ lib \ distutils \ dist.py", 953 행 self.run_command (cmd) run_command의 파일 "C : \ python27 \ lib \ distutils \ dist.py", 972 행 cmd_obj.run () 파일 "C : \ python27 \ lib \ site-packages \ setuptools \ command \ easy_install.py", 211 행, 실행 중 self.easy_install (spec, self.no_deps 아님) easy_install의 파일 "C : \ python27 \ lib \ site-packages \ setuptools \ command \ easy_install.py", 446 행 return self.install_item (spec, dist.location, tmpdir, deps) install_item의 파일 "C : \ python27 \ lib \ site-packages \ setuptools \ command \ easy_install.py", 481 행 self.process_distribution (spec, dists [0], deps, "사용") process_distribution의 파일 "C : \ python27 \ lib \ site-packages \ setuptools \ command \ easy_install.py", 519 행 [요구 사항], self.local_index, self.easy_install 파일 "C : \ python27 \ lib \ site-packages \ pkg_resources.py", 563 행, resolve dist = best [req.key] = env.best_match (req, self, installer) 파일 "C : \ python27 \ lib \ site-packages \ pkg_resources.py", 줄 799, best_match return self.obtain (req, installer) # 시도하고 다운로드 / 설치 파일 "C : \ python27 \ lib \ site-packages \ pkg_resources.py", 811 행, get 반환 설치자 (요구 사항) easy_install의 파일 "C : \ python27 \ lib \ site-packages \ setuptools \ command \ easy_install.py", 434 행 self.local_index fetch_distribution의 파일 "C : \ python27 \ lib \ site-packages \ setuptools \ package_index.py", 475 행 return dist.clone (location = self.download (dist.location, tmpdir)) AttributeError : 'NoneType'개체에 'clone'속성이 없습니다.
한 가지 문제는 easy_install이 .egg 파일 또는 소스 배포 (.tgz, .tar, .tar.gz, .tar.bz2 또는 .zip 파일에 포함)를 다운로드하고 설치하도록 설정되어 있다는 것입니다. PyWin32 확장 은 별도의 설치 프로그램 실행 파일 내에 있기 때문에 처리하는 방법을 모릅니다 . 적절한 PyWin32 설치 프로그램 파일 (Python 2.7 용)을 다운로드하고 직접 실행해야합니다. easy_install을 다시 실행하면 (Sergio의 지침과 같이 올바르게 설치 한 경우) winpexpect 패키지가 올바르게 설치되었는지 확인해야합니다.
Since it's Windows and open source we are talking about, it can often be a messy combination of install methods to get things working properly. However, easy_install is still better than hand-editing configuration files, for sure.
If you are using windows 7 64-bit version, then the solution is found here: http://pypi.python.org/pypi/setuptools
namely, you need to download a python script, run it, and then easy_install will work normally from commandline.
P.S. I agree with the original poster saying that this should work out of the box.
I also agree with the OP that all these things should come with Python already set. I guess we will have to deal with it until that day comes. Here is a solution that actually worked for me :
installing easy_install faster and easier
I hope it helps you or anyone with the same problem!
Copy the below script "ez_setup.py" from the below URL
https://bootstrap.pypa.io/ez_setup.py
And copy it into your Python location
C:\Python27>
Run the command
C:\Python27? python ez_setup.py
This will install the easy_install under Scripts directory
C:\Python27\Scripts
Run easy install from the Scripts directory >
C:\Python27\Scripts> easy_install
For one thing, it says you already have that module installed. If you need to upgrade it, you should do something like this:
easy_install -U packageName
Of course, easy_install doesn't work very well if the package has some C headers that need to be compiled and you don't have the right version of Visual Studio installed. You might try using pip or distribute instead of easy_install and see if they work better.
If you are using Anaconda's Python distribution,
you can install it through pip
pip install setuptools
and then execute it as a module
python -m easy_install
'IT Share you' 카테고리의 다른 글
.NET에서 아이스 캔디를 고정하는 방법 (클래스를 변경 불가능하게 만들기) (0) | 2020.11.28 |
---|---|
Herb Sutter의 CppCon 2014 talk (Back to Basics : Modern C ++ Style)에서 값을 취하는 setter 멤버 함수가 권장되지 않는 이유는 무엇입니까? (0) | 2020.11.28 |
javascript ArrayBuffer, 용도는 무엇입니까? (0) | 2020.11.28 |
두 파일을 편집 한 다음 GitHub 웹 기반 편집기를 사용하여 하나의 커밋을 만들 수 있습니까? (0) | 2020.11.28 |
내부 엔터프라이즈 개발에 Nuget을 어떻게 사용해야합니까? (0) | 2020.11.28 |