[英]Conda install - Python3, Tensorflow, skdata - one environment
I'm having a lot of trouble setting up my environment for machine learning projects on OS X Yosemite 10.10.5. 我在OS X Yosemite 10.10.5上为机器学习项目设置环境时遇到了很多麻烦。
GOAL: Use skData library to get datasets, python 3 to program and use the Tensorflow library. 目标:使用skData库获取数据集,使用python 3编程并使用Tensorflow库。 Ultimately create an environment that has all three. 最终创造一个拥有这三者的环境。 (I have been using conda because I installed Anaconda and that was the recommended approach) (我一直在使用conda,因为我安装了Anaconda,这是推荐的方法)
PROBLEM: It seems like in order to create an environment with Tensorflow, I had to use Conda, but I can only get skData using pip. 问题:似乎为了使用Tensorflow创建环境,我不得不使用Conda,但我只能使用pip获取skData。 When I tried conda install skdata
, the terminal said 当我尝试conda install skdata
,终端说
Error: Package missing in current osx-64 channels:
pip
is a package within tensor flow, so I tried using pip
是张量流中的一个包,所以我尝试使用
pip install SKdata
to get the SKdata package into my python 3 tensorflow environment, but hit a wall of errors 将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/
NOTE: I get the same error when I try pip install skdata --user
注意:当我尝试pip install skdata --user
时出现相同的错误
My environments are setup in my anaconda folder 我的环境是在我的anaconda文件夹中设置的
It looks like the version of skdata
available from pip is only design for use with python 2. I was able to install it in an anaconda python2.7 environment without any issue but got the same error as you when trying to install it in a python 3 environment. 看起来像pip中提供的skdata
版本只是用于python 2的设计。我能够在anaconda python2.7环境中安装它而没有任何问题但是在尝试在python中安装它时遇到了同样的错误3环境。
I was able to get it installed from the source code available here . 我可以从这里提供的源代码安装它。
It requires the packages SciPy
, NumPy
, and SciKit-Learn
in order to install. 它需要包SciPy
, NumPy
和SciKit-Learn
才能安装。 The setup will require root privileges in order to add skdata
to your easy-install
path. 设置将需要root权限才能将skdata
添加到easy-install
路径。 I'm not sure if this will work on macOS/OSX but on Linux the command 我不确定这是否可以在macOS / OSX上运行,但在Linux命令上运行
sudo env "PATH=$PATH" python setup.py install
will run the install with root privileges while using your user path so it gets installed in the right place. 将在使用您的用户路径时以root权限运行安装,以便将其安装在正确的位置。 Be sure you have the anaconda environment you want to install skdata
inactive when you run the command. 运行该命令时,请确保您要安装skdata
的anaconda环境。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.