[英]Conda install - Python3, Tensorflow, skdata - one environment
我在OS X Yosemite 10.10.5上為機器學習項目設置環境時遇到了很多麻煩。
目標:使用skData庫獲取數據集,使用python 3編程並使用Tensorflow庫。 最終創造一個擁有這三者的環境。 (我一直在使用conda,因為我安裝了Anaconda,這是推薦的方法)
問題:似乎為了使用Tensorflow創建環境,我不得不使用Conda,但我只能使用pip獲取skData。 當我嘗試conda install skdata
,終端說
Error: Package missing in current osx-64 channels:
pip
是張量流中的一個包,所以我嘗試使用
pip install SKdata
將SKdata包放入我的python 3 tensorflow環境中,但遇到了錯誤
Collecting skdata
Using cached skdata-0.0.4.tar.gz
Complete output from command python setup.py egg_info:
RefactoringTool: Skipping optional fixer: buffer
RefactoringTool: Skipping optional fixer: idioms
RefactoringTool: Skipping optional fixer: set_literal
RefactoringTool: Skipping optional fixer: ws_comma
RefactoringTool: Can't open /private/var/folders/nm/xbyhr1490q1bbfpyw41nfgg00000gp/T/pip-build-jyouqltk/skdata/build/py3k: [Errno 2] No such file or directory: '/private/var/folders/nm/xbyhr1490q1bbfpyw41nfgg00000gp/T/pip-build-jyouqltk/skdata/build/py3k'
RefactoringTool: No files need to be modified.
RefactoringTool: There was 1 error:
RefactoringTool: Can't open /private/var/folders/nm/xbyhr1490q1bbfpyw41nfgg00000gp/T/pip-build-jyouqltk/skdata/build/py3k: [Errno 2] No such file or directory: '/private/var/folders/nm/xbyhr1490q1bbfpyw41nfgg00000gp/T/pip-build-jyouqltk/skdata/build/py3k'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/nm/xbyhr1490q1bbfpyw41nfgg00000gp/T/pip-build-jyouqltk/skdata/setup.py", line 64, in <module>
raise Exception('2to3 failed, exiting ...')
Exception: 2to3 failed, exiting ...
Copying source tree into build/py3k for 2to3 transformation...
Converting to Python3 via 2to3...
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/nm/xbyhr1490q1bbfpyw41nfgg00000gp/T/pip-build-jyouqltk/skdata/
注意:當我嘗試pip install skdata --user
時出現相同的錯誤
我的環境是在我的anaconda文件夾中設置的
看起來像pip中提供的skdata
版本只是用於python 2的設計。我能夠在anaconda python2.7環境中安裝它而沒有任何問題但是在嘗試在python中安裝它時遇到了同樣的錯誤3環境。
我可以從這里提供的源代碼安裝它。
它需要包SciPy
, NumPy
和SciKit-Learn
才能安裝。 設置將需要root權限才能將skdata
添加到easy-install
路徑。 我不確定這是否可以在macOS / OSX上運行,但在Linux命令上運行
sudo env "PATH=$PATH" python setup.py install
將在使用您的用戶路徑時以root權限運行安裝,以便將其安裝在正確的位置。 運行該命令時,請確保您要安裝skdata
的anaconda環境。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.