I'm having a lot of trouble setting up my environment for machine learning projects on OS X Yosemite 10.10.5.
GOAL: Use skData library to get datasets, python 3 to program and use the Tensorflow library. Ultimately create an environment that has all three. (I have been using conda because I installed Anaconda and that was the recommended approach)
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. When I tried conda install skdata
, the terminal said
Error: Package missing in current osx-64 channels:
pip
is a package within tensor flow, so I tried using
pip install SKdata
to get the SKdata package into my python 3 tensorflow environment, but hit a wall of errors
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
My environments are setup in my anaconda folder
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.
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. The setup will require root privileges in order to add skdata
to your easy-install
path. I'm not sure if this will work on macOS/OSX but on Linux the command
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. Be sure you have the anaconda environment you want to install skdata
inactive when you run the command.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.