System information
Windows10 64bit
Python version 3.8
Tryed to install in a virtualenv using conda and pip
CUDA/cuDNN version: 9.2
GPU model and memory: NVIDIA GeForce GTX 950M
Problem
I created a virtual environment and there I started to install necessary packages. When I tried to run a script that used tensorflow, it could not imported it.
After searching for this, I tried to import it in jupyter notebook, but it didn't work.
Then, I tried to add this to my code but it didn't work either:
tf.compat.v1.enable_eager_execution(
config=None, device_policy=None, execution_mode=None
)
I tried to install tensorflow in that environment using first conda and then pip.
Sequence of commands / steps executed
-Running the script:
d:\software\anaconda_envs\sweaver\avgn_paper-vizmerge\avgn\utils\json.py:64: ResourceWarning: unclosed file <_io.TextIOWrapper name='D:\\Software\\Anaconda_envs\\sweaver\\avgn_paper-vizmerge\\data\\processed\\sociable_weaver_damelio\\2020-08-21_09-35-13\\JSON\\2018-10-19_09-00-00-000001.JSON' mode='r' encoding='cp1252'>
return json.load(open(json_loc), object_pairs_hook=OrderedDict)
ResourceWarning: Enable tracemalloc to get the object allocation traceback
HBox(children=(FloatProgress(value=0.0, description='loading json', max=1.0, style=ProgressStyle(description_w…
[Parallel(n_jobs=-1)]: Using backend LokyBackend with 8 concurrent workers.
[Parallel(n_jobs=-1)]: Done 1 out of 1 | elapsed: 3.0s finished
HBox(children=(FloatProgress(value=0.0, description='getting unique individuals', max=1.0, style=ProgressStyle…
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-43-e50f361ab3a6> in <module>
1 # create a dataset object
----> 2 dataset = DataSet(DATASET_ID, hparams = hparams)
d:\software\anaconda_envs\sweaver\avgn_paper-vizmerge\avgn\dataset.py in __init__(self, DATASET_ID, hparams, default_rate, build_mel_matrix)
43
44 if build_mel_matrix:
---> 45 self.build_mel_matrix()
46
47 def _get_wav_json_files(self):
d:\software\anaconda_envs\sweaver\avgn_paper-vizmerge\avgn\dataset.py in build_mel_matrix(self, rate)
66 if rate is None:
67 rate = self.sample_json["samplerate_hz"]
---> 68 self.mel_matrix = prepare_mel_matrix(self.hparams, rate)
69
70 def _get_unique_individuals(self):
d:\software\anaconda_envs\sweaver\avgn_paper-vizmerge\avgn\signalprocessing\filtering.py in prepare_mel_matrix(hparams, rate, return_numpy, GPU_backend)
71 os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID" # see issue #152
72 os.environ["CUDA_VISIBLE_DEVICES"] = ""
---> 73 import tensorflow as tf
74
75 tf.compat.v1.enable_eager_execution(
ModuleNotFoundError: No module named 'tensorflow'
-Import it in jupyter notebook
import sys
!conda install --yes --prefix {sys.prefix} tensorflow
UnsatisfiableError: The following specifications were found to be incompatible with the existing python installation in your environment:
Specifications:
- tensorflow -> python[version'3.5.*|3.6.*|3.7.*'
Your python: python=3.8
The following specifications were found to be incompatible with your CUDA driver:
- feature:/win-64::__cuda==9.2=0
Your installed CUDA driver is: 9.2
-When I tried to install it through conda:
(D:\Software\Anaconda_envs\sweaver) D:\Software\Anaconda_envs\sweaver>conda install tensorflow
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: -
Found conflicts! Looking for incompatible packages.
This can take several minutes. Press CTRL-C to abort.
Examining #/win-64::__cuda==9.2=0: 67%|████████████████████████████████▋ | 2/3 [00:00<00:00, 18.17it/s]|Examining conflict for __cuda: 67%|███████████████████████████████████▎ | 2/3 [00:00<00:00, 3.77it/s]|failed
UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:
Specifications:
- tensorflow -> python[version='3.5.*|3.6.*|3.7.*']
Your python: python=3.8
If python is on the left-most side of the chain, that's the version you've asked for.
When python appears to the right, that indicates that the thing on the left is somehow
not available for the python version you are constrained to. Note that conda will not
change your python version to a different minor version unless you explicitly specify
that.
The following specifications were found to be incompatible with your system:
- feature:/win-64::__cuda==9.2=0
- feature:|#/win-64::__cuda==9.2=0
Your installed version is: 9.2
-When I tried to install it using pip:
(D:\Software\Anaconda_envs\sweaver) D:\Software\Anaconda_envs\sweaver>pip install tensorflow
Collecting tensorflow
Using cached tensorflow-2.3.0-cp38-cp38-win_amd64.whl (342.5 MB)
Requirement already satisfied: wrapt>=1.11.1 in d:\software\anaconda_envs\sweaver\lib\site-packages (from tensorflow) (1.11.2)
Collecting keras-preprocessing<1.2,>=1.1.1
Using cached Keras_Preprocessing-1.1.2-py2.py3-none-any.whl (42 kB)
Collecting tensorboard<3,>=2.3.0
Using cached tensorboard-2.3.0-py3-none-any.whl (6.8 MB)
Requirement already satisfied: grpcio>=1.8.6 in d:\software\anaconda_envs\sweaver\lib\site-packages (from tensorflow) (1.31.0)
Collecting numpy<1.19.0,>=1.16.0
Using cached numpy-1.18.5-cp38-cp38-win_amd64.whl (12.8 MB)
Collecting opt-einsum>=2.3.2
Using cached opt_einsum-3.3.0-py3-none-any.whl (65 kB)
Requirement already satisfied: absl-py>=0.7.0 in d:\software\anaconda_envs\sweaver\lib\site-packages (from tensorflow) (0.10.0)
Requirement already satisfied: wheel>=0.26 in d:\software\anaconda_envs\sweaver\lib\site-packages (from tensorflow) (0.34.2)
Collecting scipy==1.4.1
Using cached scipy-1.4.1-cp38-cp38-win_amd64.whl (31.0 MB)
Collecting astunparse==1.6.3
Using cached astunparse-1.6.3-py2.py3-none-any.whl (12 kB)
Requirement already satisfied: h5py<2.11.0,>=2.10.0 in d:\software\anaconda_envs\sweaver\lib\site-packages (from tensorflow) (2.10.0)
Collecting protobuf>=3.9.2
Using cached protobuf-3.13.0-py2.py3-none-any.whl (438 kB)
Collecting google-pasta>=0.1.8
Using cached google_pasta-0.2.0-py3-none-any.whl (57 kB)
Requirement already satisfied: tensorflow-estimator<2.4.0,>=2.3.0 in d:\software\anaconda_envs\sweaver\lib\site-packages (from tensorflow) (2.3.0)
Requirement already satisfied: gast==0.3.3 in d:\software\anaconda_envs\sweaver\lib\site-packages (from tensorflow) (0.3.3)
Requirement already satisfied: six>=1.12.0 in d:\software\anaconda_envs\sweaver\lib\site-packages (from tensorflow) (1.15.0)
Processing c:\users\bf\appdata\local\pip\cache\wheels\a0\16\9c\5473df82468f958445479c59e784896fa24f4a5fc024b0f501\termcolor-1.1.0-py3-none-any.whl
Requirement already satisfied: werkzeug>=0.11.15 in d:\software\anaconda_envs\sweaver\lib\site-packages (from tensorboard<3,>=2.3.0->tensorflow) (1.0.1)
Collecting markdown>=2.6.8
Using cached Markdown-3.2.2-py3-none-any.whl (88 kB)
Collecting google-auth-oauthlib<0.5,>=0.4.1
Using cached google_auth_oauthlib-0.4.1-py2.py3-none-any.whl (18 kB)
Requirement already satisfied: setuptools>=41.0.0 in d:\software\anaconda_envs\sweaver\lib\site-packages (from tensorboard<3,>=2.3.0->tensorflow) (49.6.0.post20200814)
Collecting tensorboard-plugin-wit>=1.6.0
Using cached tensorboard_plugin_wit-1.7.0-py3-none-any.whl (779 kB)
Requirement already satisfied: requests<3,>=2.21.0 in d:\software\anaconda_envs\sweaver\lib\site-packages (from tensorboard<3,>=2.3.0->tensorflow) (2.24.0)
Requirement already satisfied: google-auth<2,>=1.6.3 in d:\software\anaconda_envs\sweaver\lib\site-packages (from tensorboard<3,>=2.3.0->tensorflow) (1.20.1)
Collecting requests-oauthlib>=0.7.0
Using cached requests_oauthlib-1.3.0-py2.py3-none-any.whl (23 kB)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in d:\software\anaconda_envs\sweaver\lib\site-packages (from requests<3,>=2.21.0->tensorboard<3,>=2.3.0->tensorflow) (1.25.10)
Requirement already satisfied: certifi>=2017.4.17 in d:\software\anaconda_envs\sweaver\lib\site-packages (from requests<3,>=2.21.0->tensorboard<3,>=2.3.0->tensorflow) (2020.6.20)
Requirement already satisfied: chardet<4,>=3.0.2 in d:\software\anaconda_envs\sweaver\lib\site-packages (from requests<3,>=2.21.0->tensorboard<3,>=2.3.0->tensorflow) (3.0.4)
Requirement already satisfied: idna<3,>=2.5 in d:\software\anaconda_envs\sweaver\lib\site-packages (from requests<3,>=2.21.0->tensorboard<3,>=2.3.0->tensorflow) (2.10)
Requirement already satisfied: pyasn1-modules>=0.2.1 in d:\software\anaconda_envs\sweaver\lib\site-packages (from google-auth<2,>=1.6.3->tensorboard<3,>=2.3.0->tensorflow) (0.2.8)
Requirement already satisfied: rsa<5,>=3.1.4; python_version >= "3.5" in d:\software\anaconda_envs\sweaver\lib\site-packages (from google-auth<2,>=1.6.3->tensorboard<3,>=2.3.0->tensorflow) (4.5)
Requirement already satisfied: cachetools<5.0,>=2.0.0 in d:\software\anaconda_envs\sweaver\lib\site-packages (from google-auth<2,>=1.6.3->tensorboard<3,>=2.3.0->tensorflow) (4.1.1)
Collecting oauthlib>=3.0.0
Using cached oauthlib-3.1.0-py2.py3-none-any.whl (147 kB)
Requirement already satisfied: pyasn1<0.5.0,>=0.4.6 in d:\software\anaconda_envs\sweaver\lib\site-packages (from pyasn1-modules>=0.2.1->google-auth<2,>=1.6.3->tensorboard<3,>=2.3.0->tensorflow) (0.4.8)
ERROR: Error while checking for conflicts. Please file an issue on pip's issue tracker: https://github.com/pypa/pip/issues/new
Traceback (most recent call last):
File "D:\Software\Anaconda_envs\sweaver\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 3021, in _dep_map
return self.__dep_map
File "D:\Software\Anaconda_envs\sweaver\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2815, in __getattr__
raise AttributeError(attr)
AttributeError: _DistInfoDistribution__dep_map
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\Software\Anaconda_envs\sweaver\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 3012, in _parsed_pkg_info
return self._pkg_info
File "D:\Software\Anaconda_envs\sweaver\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2815, in __getattr__
raise AttributeError(attr)
AttributeError: _pkg_info
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\Software\Anaconda_envs\sweaver\lib\site-packages\pip\_internal\commands\install.py", line 535, in _determine_conflicts
return check_install_conflicts(to_install)
File "D:\Software\Anaconda_envs\sweaver\lib\site-packages\pip\_internal\operations\check.py", line 108, in check_install_conflicts
package_set, _ = create_package_set_from_installed()
File "D:\Software\Anaconda_envs\sweaver\lib\site-packages\pip\_internal\operations\check.py", line 50, in create_package_set_from_installed
package_set[name] = PackageDetails(dist.version, dist.requires())
File "D:\Software\Anaconda_envs\sweaver\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2736, in requires
dm = self._dep_map
File "D:\Software\Anaconda_envs\sweaver\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 3023, in _dep_map
self.__dep_map = self._compute_dependencies()
File "D:\Software\Anaconda_envs\sweaver\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 3032, in _compute_dependencies
for req in self._parsed_pkg_info.get_all('Requires-Dist') or []:
File "D:\Software\Anaconda_envs\sweaver\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 3014, in _parsed_pkg_info
metadata = self.get_metadata(self.PKG_INFO)
File "D:\Software\Anaconda_envs\sweaver\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 1420, in get_metadata
value = self._get(path)
File "D:\Software\Anaconda_envs\sweaver\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 1616, in _get
with open(path, 'rb') as stream:
FileNotFoundError: [Errno 2] No such file or directory: 'd:\\software\\anaconda_envs\\sweaver\\lib\\site-packages\\numpy-1.19.1.dist-info\\METADATA'
Installing collected packages: numpy, keras-preprocessing, protobuf, markdown, oauthlib, requests-oauthlib, google-auth-oauthlib, tensorboard-plugin-wit, tensorboard, opt-einsum, scipy, astunparse, google-pasta, termcolor, tensorflow
Attempting uninstall: numpy
Found existing installation: numpy 1.19.1
ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: 'd:\\software\\anaconda_envs\\sweaver\\lib\\site-packages\\numpy-1.19.1.dist-info\\RECORD'
Maybe it's a problem of compatibility between tensorflow and numpy? But the file 'd:\software\anaconda_envs\sweaver\lib\site-packages\numpy-1.19.1.dist-info\RECORD' actually does not exist.
I searched in my packages and there is a folder of numpy, numpy-1.18.5.dist-info and numpy-1.19.1.dist-info, but inside the last one, there are only two files: LICENSES_bundled.txt and REQUESTED.
Then, I deleted the folder numpy-1.19.1dist-info and intalled tensorflow through the command line using --user to allow the installation, but it got installed in other place.
So, I use:
import sys
sys.path.append()
in every py file of tensorflow but still didn't work. Also one of the files (pywrap_tensorflow_internal.py) was empty, showing that there was some problem in installation.
Hope you can help me.
Sometimes conda has issues. I had the same problem. All you have to do is create a new environment again and try do downgrade your Python version to 3.7
Related
When I am installing tensorflow in python 3.8.0 then it shows error. How to downgrade python version without affecting other files.
(base) C:\Users\Akanksha-Lab-PC>pip uninstall python 3.8.4
WARNING: Skipping python as it is not installed.
WARNING: Skipping 3.8.4 as it is not installed.
(base) C:\Users\Akanksha-Lab-PC>pip uninstall python-3.8.4
WARNING: Skipping python-3.8.4 as it is not installed.
(base) C:\Users\Akanksha-Lab-PC>make altinstall python-3.7
'make' is not recognized as an internal or external command,
operable program or batch file.
(base) C:\Users\Akanksha-Lab-PC>pip install python-3.7
ERROR: Could not find a version that satisfies the requirement python-3.7 (from versions: none)
ERROR: No matching distribution found for python-3.7
When I type the command pip show tensorflow it gives me this
(base) C:\Users\Akanksha-Lab-PC>python --version
Python 3.8.5
(base) C:\Users\Akanksha-Lab-PC>pip show tensorflow
WARNING: Package(s) not found: tensorflow
When I am installing tensorflow by using this command:
pip install tensorflow
it gives this error
(base) C:\Users\Akanksha-Lab-PC>pip install tensorflow
Collecting tensorflow
Using cached tensorflow-2.4.1-cp38-cp38-win_amd64.whl (370.7 MB)
Requirement already satisfied: six~=1.15.0 in c:\programdata\anaconda3\lib\site-packages (from tensorflow) (1.15.0)
Collecting astunparse~=1.6.3
Using cached astunparse-1.6.3-py2.py3-none-any.whl (12 kB)
Requirement already satisfied: protobuf>=3.9.2 in c:\programdata\anaconda3\lib\site-packages (from tensorflow) (3.14.0)
Requirement already satisfied: typing-extensions~=3.7.4 in c:\programdata\anaconda3\lib\site-packages (from tensorflow) (3.7.4.3)
Requirement already satisfied: wheel~=0.35 in c:\programdata\anaconda3\lib\site-packages (from tensorflow) (0.35.1)
Requirement already satisfied: numpy~=1.19.2 in c:\programdata\anaconda3\lib\site-packages (from tensorflow) (1.19.2)
Processing c:\users\akanksha-lab-pc\appdata\local\pip\cache\wheels\a0\16\9c\5473df82468f958445479c59e784896fa24f4a5fc024b0f501\termcolor-1.1.0-py3-none-any.whl
Requirement already satisfied: flatbuffers~=1.12.0 in c:\programdata\anaconda3\lib\site-packages (from tensorflow) (1.12)
Collecting absl-py~=0.10
Using cached absl_py-0.11.0-py3-none-any.whl (127 kB)
Requirement already satisfied: h5py~=2.10.0 in c:\programdata\anaconda3\lib\site-packages (from tensorflow) (2.10.0)
Collecting keras-preprocessing~=1.1.2
Using cached Keras_Preprocessing-1.1.2-py2.py3-none-any.whl (42 kB)
Requirement already satisfied: google-pasta~=0.2 in c:\programdata\anaconda3\lib\site-packages (from tensorflow) (0.2.0)
Collecting gast==0.3.3
Using cached gast-0.3.3-py2.py3-none-any.whl (9.7 kB)
Collecting grpcio~=1.32.0
Using cached grpcio-1.32.0-cp38-cp38-win_amd64.whl (2.6 MB)
Collecting tensorflow-estimator<2.5.0,>=2.4.0
Using cached tensorflow_estimator-2.4.0-py2.py3-none-any.whl (462 kB)
Collecting tensorboard~=2.4
Using cached tensorboard-2.4.1-py3-none-any.whl (10.6 MB)
Collecting opt-einsum~=3.3.0
Using cached opt_einsum-3.3.0-py3-none-any.whl (65 kB)
Processing c:\users\akanksha-lab-pc\appdata\local\pip\cache\wheels\5f\fd\9e\b6cf5890494cb8ef0b5eaff72e5d55a70fb56316007d6dfe73\wrapt-1.12.1-py3-none-any.whl
Collecting google-auth-oauthlib<0.5,>=0.4.1
Using cached google_auth_oauthlib-0.4.2-py2.py3-none-any.whl (18 kB)
Requirement already satisfied: setuptools>=41.0.0 in c:\programdata\anaconda3\lib\site-packages (from tensorboard~=2.4->tensorflow) (50.3.1.post20201107)
Collecting markdown>=2.6.8
Using cached Markdown-3.3.3-py3-none-any.whl (96 kB)
Collecting google-auth<2,>=1.6.3
Using cached google_auth-1.24.0-py2.py3-none-any.whl (114 kB)
Collecting tensorboard-plugin-wit>=1.6.0
Using cached tensorboard_plugin_wit-1.8.0-py3-none-any.whl (781 kB)
Requirement already satisfied: requests<3,>=2.21.0 in c:\programdata\anaconda3\lib\site-packages (from tensorboard~=2.4->tensorflow) (2.24.0)
Requirement already satisfied: werkzeug>=0.11.15 in c:\programdata\anaconda3\lib\site-packages (from tensorboard~=2.4->tensorflow) (1.0.1)
Collecting requests-oauthlib>=0.7.0
Using cached requests_oauthlib-1.3.0-py2.py3-none-any.whl (23 kB)
Collecting pyasn1-modules>=0.2.1
Using cached pyasn1_modules-0.2.8-py2.py3-none-any.whl (155 kB)
Collecting cachetools<5.0,>=2.0.0
Using cached cachetools-4.2.1-py3-none-any.whl (12 kB)
Collecting rsa<5,>=3.1.4; python_version >= "3.6"
Using cached rsa-4.7-py3-none-any.whl (34 kB)
Requirement already satisfied: certifi>=2017.4.17 in c:\programdata\anaconda3\lib\site-packages (from requests<3,>=2.21.0->tensorboard~=2.4->tensorflow) (2020.6.20)
Requirement already satisfied: idna<3,>=2.5 in c:\programdata\anaconda3\lib\site-packages (from requests<3,>=2.21.0->tensorboard~=2.4->tensorflow) (2.10)
Requirement already satisfied: chardet<4,>=3.0.2 in c:\programdata\anaconda3\lib\site-packages (from requests<3,>=2.21.0->tensorboard~=2.4->tensorflow) (3.0.4)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in c:\programdata\anaconda3\lib\site-packages (from requests<3,>=2.21.0->tensorboard~=2.4->tensorflow) (1.25.11)
Collecting oauthlib>=3.0.0
Using cached oauthlib-3.1.0-py2.py3-none-any.whl (147 kB)
Collecting pyasn1<0.5.0,>=0.4.6
Using cached pyasn1-0.4.8-py2.py3-none-any.whl (77 kB)
Installing collected packages: astunparse, termcolor, absl-py, keras-preprocessing, gast, grpcio, tensorflow-estimator, oauthlib, requests-oauthlib, pyasn1, pyasn1-modules, cachetools, rsa, google-auth, google-auth-oauthlib, markdown, tensorboard-plugin-wit, tensorboard, opt-einsum, wrapt, tensorflow
Attempting uninstall: wrapt
Found existing installation: wrapt 1.11.2
Uninstalling wrapt-1.11.2:
ERROR: Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: 'c:\\programdata\\anaconda3\\lib\\site-packages\\wrapt-1.11.2.dist-info\\INSTALLER'
Consider using the `--user` option or check the permissions.
Can anybody tell me the solution of this?
pip uninstall python 3.8.4
This command will never work. pip is a python package manager, i.e. for an installation of python, pip is responsible to install modules to that python installation. It does not manage the installation of python itself
To your error with the tensorflow installation:
pip install tensorflow
and
ERROR: Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: 'c:\\programdata\\anaconda3\\lib\\site-packages\\wrapt-1.11.2.dist-info\\INSTALLER'
This is caused by the fact that the c:\\programdata is write protected from non-admin users, so in order for your command to succeed, you should run your cmd as admin.
BUT:
It seems like you have installed anaconda and are trying to install tensorflow into the base environment using pip. Pip in turn tries to uninstall some already existing package, probably to fulfill the tensorflow requirements. But the already existing package are probably installed by conda when you first installed anaconda, so you ware getting into dangerous waters here and you are risking to break your base environment, so two suggestions:
Create a new environment conda create -n tf tensorflow-gpu
Use conda commands to install tensorflow. conda install tensorflow-gpu will give you tensorflow
To your other question:
How to downgrade python
The solution is also to use a conda command:
conda install python=<some version>
or, even better, simply create an environment with the version you need:
conda create -n py37 python=3.7
would for example give you an environment called py37 with python3.7 installed. It can be activated and used with
conda activate py37
I have an issue with the installation of Tensorflow
I just completed installing Tensorflow with
$ pip install --user --upgrade tensorflow
and these are the last lines I get after this installation
Successfully built absl-py gast
Installing collected packages: wheel, six, grpcio, absl-py, numpy, gast, astor, tensorflow, h5py, werkzeug, se tuptools
Successfully installed absl-py-0.7.1 astor-0.8.0 gast-0.2.2 grpcio-1.21.1 h5py-2.9.0 numpy-1.16.4 setuptools-4 1.0.1 six-1.12.0 tensorflow-1.13.1 werkzeug-0.15.4 wheel-0.33.4 `````
and then when I enter the following command:
$ pip install --upgrade tensorflow
I do get a bunch of requirement already up-to-date as per the below .
Requirement already up-to-date: tensorflow in c:\users\xxx\appdata\roaming\python\python36\site-packages
Requirement already up-to-date: tensorflow-estimator<1.14.0rc0,>=1.13.0 in c:\programdata\anaconda3\lib\site-p ackages (from tensorflow)
Requirement already up-to-date: numpy>=1.13.3 in c:\users\xxx\appdata\roaming\python\python36\site-packag es (from tensorflow)
Requirement already up-to-date: gast>=0.2.0 in c:\users\xxx\appdata\roaming\python\python36\site-packages (from tensorflow)
Requirement already up-to-date: six>=1.10.0 in c:\users\xxx\appdata\roaming\python\python36\site-packages (from tensorflow)
Requirement already up-to-date: keras-preprocessing>=1.0.5 in c:\programdata\anaconda3\lib\site-packages (from tensorflow)
Requirement already up-to-date: tensorboard<1.14.0,>=1.13.0 in c:\programdata\anaconda3\lib\site-packages (fro m tensorflow)
Requirement already up-to-date: astor>=0.6.0 in c:\users\xxxx\appdata\roaming\python\python36\site-package s (from tensorflow)
Requirement already up-to-date: termcolor>=1.1.0 in c:\programdata\anaconda3\lib\site-packages (from tensorflo w)
Requirement already up-to-date: wheel>=0.26 in c:\users\xxxx\appdata\roaming\python\python36\site-packages (from tensorflow)
Requirement already up-to-date: keras-applications>=1.0.6 in c:\programdata\anaconda3\lib\site-packages (from tensorflow)
Requirement already up-to-date: grpcio>=1.8.6 in c:\users\xxxx\appdata\roaming\python\python36\site-packag es (from tensorflow)
Requirement already up-to-date: protobuf>=3.6.1 in c:\programdata\anaconda3\lib\site-packages (from tensorflow )
Which I interpret as everything is installed and upgraded ( am I wrong here ? )
Now my issue is that when I try to import Tensorflow let say in Jupyter notebook , I get the following error message
ImportError: Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "C:\ProgramData\Anaconda3\lib\imp.py", line 243, in load_module
return load_dynamic(name, filename, file)
File "C:\ProgramData\Anaconda3\lib\imp.py", line 343, in load_dynamic
return _load(spec)
ImportError: DLL load failed: The specified module could not be found.
Failed to load the native TensorFlow runtime.
See https://www.tensorflow.org/install/errors
for some common reasons and solutions. Include the entire stack trace
above this error message when asking for help.
Any idea what could be the reason and what i need to change to get tensorflow up and running ?
Thanks guys in advance for any help with the above issue .
I've solved this problem by downgrading tensorflow to version 2.0 using this command:
pip install tensorflow==2.0
and then use like this :
from tensorflow.keras.applications import vgg19
from tensorflow.keras.models import load_model
I hope it helps.
I'm trying to install tensorflow after an OS update. I'm getting an [Errno 13] Permission denied. All the forum posts I've checked recommend solving this using a virtual environment. Problem is I'm already working in a virtual environment.
here are the command's I used:
user#Computer:~$ cd /tensorflow
user#Computer:/tensorflow$ virtualenv --system-site-packages -p python3 venv
user#Computer:/tensorflow$ source /tensorflow/venv/bin/activate
(venv) user#Computer:/tensorflow$ pip install -U tensorflow-GPU
and here's the output I got:
(venv) user#Computer:/tensorflow$ pip install -U tensorflow-GPU
Using cached https://files.pythonhosted.org/packages/64/ca/830b7cedb073ae264d215d51bd18d7cff7a2a47e39d79f6fa23edae17bb2/tensorflow_gpu-1.10.0-cp36-cp36m-manylinux1_x86_64.whl
Collecting gast>=0.2.0 (from tensorflow-GPU)
Collecting tensorboard<1.11.0,>=1.10.0 (from tensorflow-GPU)
Using cached https://files.pythonhosted.org/packages/c6/17/ecd918a004f297955c30b4fffbea100b1606c225dbf0443264012773c3ff/tensorboard-1.10.0-py3-none-any.whl
Collecting grpcio>=1.8.6 (from tensorflow-GPU)
Using cached https://files.pythonhosted.org/packages/31/17/0f79ff2f56018aa0e12ffb1cc8086df6bd6cfc71efea0df64fe78d569f71/grpcio-1.14.1-cp36-cp36m-manylinux1_x86_64.whl
Requirement already satisfied, skipping upgrade: six>=1.10.0 in /usr/lib/python3/dist-packages (from tensorflow-GPU) (1.11.0)
Collecting astor>=0.6.0 (from tensorflow-GPU)
Using cached https://files.pythonhosted.org/packages/35/6b/11530768cac581a12952a2aad00e1526b89d242d0b9f59534ef6e6a1752f/astor-0.7.1-py2.py3-none-any.whl
Collecting protobuf>=3.6.0 (from tensorflow-GPU)
Using cached https://files.pythonhosted.org/packages/fc/f0/db040681187496d10ac50ad167a8fd5f953d115b16a7085e19193a6abfd2/protobuf-3.6.0-cp36-cp36m-manylinux1_x86_64.whl
Requirement already satisfied, skipping upgrade: wheel>=0.26 in ./venv/lib/python3.6/site-packages (from tensorflow-GPU) (0.31.1)
Collecting absl-py>=0.1.6 (from tensorflow-GPU)
Collecting termcolor>=1.1.0 (from tensorflow-GPU)
Collecting setuptools<=39.1.0 (from tensorflow-GPU)
Using cached https://files.pythonhosted.org/packages/8c/10/79282747f9169f21c053c562a0baa21815a8c7879be97abd930dbcf862e8/setuptools-39.1.0-py2.py3-none-any.whl
Collecting numpy<=1.14.5,>=1.13.3 (from tensorflow-GPU)
Using cached https://files.pythonhosted.org/packages/68/1e/116ad560de97694e2d0c1843a7a0075cc9f49e922454d32f49a80eb6f1f2/numpy-1.14.5-cp36-cp36m-manylinux1_x86_64.whl
Collecting markdown>=2.6.8 (from tensorboard<1.11.0,>=1.10.0->tensorflow-GPU)
Using cached https://files.pythonhosted.org/packages/6d/7d/488b90f470b96531a3f5788cf12a93332f543dbab13c423a5e7ce96a0493/Markdown-2.6.11-py2.py3-none-any.whl
Collecting werkzeug>=0.11.10 (from tensorboard<1.11.0,>=1.10.0->tensorflow-GPU)
Using cached https://files.pythonhosted.org/packages/20/c4/12e3e56473e52375aa29c4764e70d1b8f3efa6682bef8d0aae04fe335243/Werkzeug-0.14.1-py2.py3-none-any.whl
Installing collected packages: gast, numpy, markdown, setuptools, protobuf, werkzeug, tensorboard, grpcio, astor, absl-py, termcolor, tensorflow-GPU
Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/tensorflow/venv/lib/python3.6/site-packages/gast'
Consider using the `--user` option or check the permissions.
Including the '--user' option gives the following result
(venv) user#Computer:/tensorflow$ pip install --user tensorflow-GPU
Collecting tensorflow-GPU
Using cached https://files.pythonhosted.org/packages/64/ca/830b7cedb073ae264d215d51bd18d7cff7a2a47e39d79f6fa23edae17bb2/tensorflow_gpu-1.10.0-cp36-cp36m-manylinux1_x86_64.whl
Collecting absl-py>=0.1.6 (from tensorflow-GPU)
Collecting astor>=0.6.0 (from tensorflow-GPU)
Using cached https://files.pythonhosted.org/packages/35/6b/11530768cac581a12952a2aad00e1526b89d242d0b9f59534ef6e6a1752f/astor-0.7.1-py2.py3-none-any.whl
Collecting gast>=0.2.0 (from tensorflow-GPU)
Collecting tensorboard<1.11.0,>=1.10.0 (from tensorflow-GPU)
Using cached https://files.pythonhosted.org/packages/c6/17/ecd918a004f297955c30b4fffbea100b1606c225dbf0443264012773c3ff/tensorboard-1.10.0-py3-none-any.whl
Collecting termcolor>=1.1.0 (from tensorflow-GPU)
Collecting numpy<=1.14.5,>=1.13.3 (from tensorflow-GPU)
Using cached https://files.pythonhosted.org/packages/68/1e/116ad560de97694e2d0c1843a7a0075cc9f49e922454d32f49a80eb6f1f2/numpy-1.14.5-cp36-cp36m-manylinux1_x86_64.whl
Will not install to the user site because it will lack sys.path precedence to setuptools in /tensorflow/venv/lib/python3.6/site-packages
I did some more digging.
Apparently the virtualenv was created using sudo so I needed to alter permissions.
Details here:
How to avoid "Permission denied" when using pip with virtualenv
to be specific it was
sudo chown -R your_username:your_username path/to/virtuaelenv/
I'm trying to install shub, the Scrapinghub command line tool in OSX 10.11.6 (El Capitan) via pip. The installation script downloads the required modules and at some point returns the following error:
OSError: [Errno 1] Operation not permitted: '/System/Library/Frameworks/Python.framework/Versions/2.7/man'
I used the following command:
$ sudo -H pip install shub --ignore-installed six
and received the following traceback:
Collecting shub
Using cached shub-2.7.0-py2.py3-none-any.whl
Collecting six
Using cached six-1.11.0-py2.py3-none-any.whl
Collecting retrying (from shub)
Using cached retrying-1.3.3.tar.gz
Collecting tqdm (from shub)
Using cached tqdm-4.19.2-py2.py3-none-any.whl
Collecting pip (from shub)
Using cached pip-9.0.1-py2.py3-none-any.whl
Collecting PyYAML (from shub)
Using cached PyYAML-3.12.tar.gz
Collecting docker-py (from shub)
Using cached docker_py-1.10.6-py2.py3-none-any.whl
Collecting click (from shub)
Using cached click-6.7-py2.py3-none-any.whl
Collecting requests (from shub)
Using cached requests-2.18.4-py2.py3-none-any.whl
Collecting scrapinghub>=1.9.0 (from shub)
Using cached scrapinghub-2.0.1-py2.py3-none-any.whl
Collecting backports.ssl-match-hostname>=3.5; python_version < "3.5" (from docker-py->shub)
Using cached backports.ssl_match_hostname-3.5.0.1.tar.gz
Collecting ipaddress>=1.0.16; python_version < "3.3" (from docker-py->shub)
Using cached ipaddress-1.0.18-py2-none-any.whl
Collecting docker-pycreds>=0.2.1 (from docker-py->shub)
Using cached docker_pycreds-0.2.1-py2.py3-none-any.whl
Collecting websocket-client>=0.32.0 (from docker-py->shub)
Using cached websocket_client-0.44.0-py2.py3-none-any.whl
Collecting urllib3<1.23,>=1.21.1 (from requests->shub)
Using cached urllib3-1.22-py2.py3-none-any.whl
Collecting idna<2.7,>=2.5 (from requests->shub)
Using cached idna-2.6-py2.py3-none-any.whl
Collecting chardet<3.1.0,>=3.0.2 (from requests->shub)
Using cached chardet-3.0.4-py2.py3-none-any.whl
Collecting certifi>=2017.4.17 (from requests->shub)
Using cached certifi-2017.7.27.1-py2.py3-none-any.whl
Installing collected packages: six, retrying, tqdm, pip, PyYAML, urllib3, idna, chardet, certifi, requests, backports.ssl-match-hostname, ipaddress, docker-pycreds, websocket-client, docker-py, click, scrapinghub, shub
Running setup.py install for retrying ... done
Exception:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/commands/install.py", line 342, in run
prefix=options.prefix_path,
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_set.py", line 784, in install
**kwargs
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_install.py", line 851, in install
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/req/req_install.py", line 1064, in move_wheel_files
isolated=self.isolated,
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/wheel.py", line 377, in move_wheel_files
clobber(source, dest, False, fixer=fixer, filter=filter)
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/wheel.py", line 316, in clobber
ensure_dir(destdir)
File "/Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg/pip/utils/__init__.py", line 83, in ensure_dir
os.makedirs(path)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 150, in makedirs
makedirs(head, mode)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 1] Operation not permitted: '/System/Library/Frameworks/Python.framework/Versions/2.7/man'
Any thoughts as to what is causing this problem? Thanks in advance.
EDIT:
The problem was solved by installing Homebrew. The instructions are on this link: https://docs.scrapy.org/en/latest/intro/install.html#mac-os-x
After Homebrew was installed, I installed shub with the following command:
pip install shub and received the following:
Collecting shub
Using cached shub-2.7.0-py2.py3-none-any.whl
Requirement already satisfied: retrying in /Library/Python/2.7/site-packages (from shub)
Collecting click (from shub)
Using cached click-6.7-py2.py3-none-any.whl
Requirement already satisfied: requests in /Library/Python/2.7/site-packages (from shub)
Collecting scrapinghub>=1.9.0 (from shub)
Using cached scrapinghub-2.0.1-py2.py3-none-any.whl
Requirement already satisfied: pip in /usr/local/lib/python2.7/site-packages (from shub)
Collecting docker-py (from shub)
Using cached docker_py-1.10.6-py2.py3-none-any.whl
Requirement already satisfied: PyYAML in /Library/Python/2.7/site-packages (from shub)
Requirement already satisfied: tqdm in /Library/Python/2.7/site-packages (from shub)
Requirement already satisfied: six>=1.7.0 in /Library/Python/2.7/site-packages (from shub)
Requirement already satisfied: urllib3<1.23,>=1.21.1 in /Library/Python/2.7/site-packages (from requests->shub)
Requirement already satisfied: idna<2.7,>=2.5 in /Library/Python/2.7/site-packages (from requests->shub)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /Library/Python/2.7/site-packages (from requests->shub)
Requirement already satisfied: certifi>=2017.4.17 in /Library/Python/2.7/site-packages (from requests->shub)
Requirement already satisfied: backports.ssl-match-hostname>=3.5; python_version < "3.5" in /Library/Python/2.7/site-packages (from docker-py->shub)
Requirement already satisfied: ipaddress>=1.0.16; python_version < "3.3" in /Library/Python/2.7/site-packages (from docker-py->shub)
Collecting docker-pycreds>=0.2.1 (from docker-py->shub)
Using cached docker_pycreds-0.2.1-py2.py3-none-any.whl
Collecting websocket-client>=0.32.0 (from docker-py->shub)
Using cached websocket_client-0.44.0-py2.py3-none-any.whl
Installing collected packages: click, scrapinghub, docker-pycreds, websocket-client, docker-py, shub
Successfully installed click-6.7 docker-py-1.10.6 docker-pycreds-0.2.1 scrapinghub-2.0.1 shub-2.7.0 websocket-client-0.44.0
Now shub is installed.
NEW PROBLEM:
shub has been installed, but none of the shub commands are returning data. When using the shub login command, I receive the following traceback:
Traceback (most recent call last):
File "/usr/local/bin/shub", line 7, in <module>
from shub.tool import cli
File "/usr/local/lib/python2.7/site-packages/shub/tool.py", line 57, in <module>
command_module = importlib.import_module(module_path)
File "/usr/local/Cellar/python/2.7.14/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/usr/local/lib/python2.7/site-packages/shub/deploy.py", line 10, in <module>
import setuptools
File "/usr/local/lib/python2.7/site-packages/setuptools/__init__.py", line 10, in <module>
from setuptools.extern.six.moves import filter, map
File "/usr/local/lib/python2.7/site-packages/setuptools/setuptools/__init__.py", line 160, in <module>
monkey.patch_all()
File "/usr/local/lib/python2.7/site-packages/setuptools/setuptools/monkey.py", line 67, in patch_all
distutils.core.Command = setuptools.Command
AttributeError: 'module' object has no attribute 'Command'
I checked to see if there were any required version of packaging present that i needed, but everything is current.
Any help is greatly appreciated. Thanks in advance.
I have installed python in my mac. But when i try to install ipython notebook using pip install ipython notebook it throws an exception. I'm a beginner to python. This is what i get when i try to install ipython notebook
pip install ipython notebook
Collecting ipython
Using cached ipython-4.0.1-py2-none-any.whl
Collecting notebook
Downloading notebook-4.0.6-py2.py3-none-any.whl (5.6MB)
100% |████████████████████████████████| 5.6MB 102kB/s
Collecting traitlets (from ipython)
Using cached traitlets-4.0.0-py2.py3-none-any.whl
Collecting pickleshare (from ipython)
Using cached pickleshare-0.5.tar.gz
Collecting simplegeneric>0.8 (from ipython)
Using cached simplegeneric-0.8.1.zip
Collecting decorator (from ipython)
Using cached decorator-4.0.6-py2.py3-none-any.whl
Collecting gnureadline (from ipython)
Using cached gnureadline-6.3.3-cp27-none-macosx_10_6_intel.whl
Collecting appnope (from ipython)
Using cached appnope-0.1.0-py2.py3-none-any.whl
Collecting pexpect (from ipython)
Using cached pexpect-4.0.1.tar.gz
Collecting tornado>=4 (from notebook)
Downloading tornado-4.3.tar.gz (450kB)
100% |████████████████████████████████| 454kB 68kB/s
Collecting jupyter-client (from notebook)
Downloading jupyter_client-4.1.1-py2.py3-none-any.whl (70kB)
100% |████████████████████████████████| 73kB 66kB/s
Collecting nbformat (from notebook)`enter code here`
Downloading nbformat-4.0.1-py2.py3-none-any.whl (138kB)
100% |████████████████████████████████| 139kB 66kB/s
Collecting jupyter-core (from notebook)
Downloading jupyter_core-4.0.6-py2.py3-none-any.whl (74kB)
100% |████████████████████████████████| 77kB 4.1MB/s
Collecting jinja2 (from notebook)
Downloading Jinja2-2.8-py2.py3-none-any.whl (263kB)
100% |████████████████████████████████| 266kB 66kB/s
Collecting ipykernel (from notebook)
Downloading ipykernel-4.2.1-py2.py3-none-any.whl (90kB)
100% |████████████████████████████████| 94kB 4.0MB/s
Collecting terminado>=0.3.3 (from notebook)
Downloading terminado-0.5.tar.gz
Collecting ipython-genutils (from notebook)
Using cached ipython_genutils-0.1.0-py2.py3-none-any.whl
Collecting nbconvert (from notebook)
Downloading nbconvert-4.1.0-py2.py3-none-any.whl (281kB)
100% |████████████████████████████████| 282kB 81kB/s
Collecting path.py (from pickleshare->ipython)
Using cached path.py-8.1.2-py2.py3-none-any.whl
Collecting ptyprocess>=0.5 (from pexpect->ipython)
Using cached ptyprocess-0.5.tar.gz
Collecting backports.ssl-match-hostname (from tornado>=4->notebook)
Downloading backports.ssl_match_hostname-3.4.0.2.tar.gz
Collecting singledispatch (from tornado>=4->notebook)
Downloading singledispatch-3.4.0.3-py2.py3-none-any.whl
Collecting certifi (from tornado>=4->notebook)
Downloading certifi-2015.11.20.1-py2.py3-none-any.whl (368kB)
100% |████████████████████████████████| 372kB 919kB/s
Collecting backports-abc>=0.4 (from tornado>=4->notebook)
Downloading backports_abc-0.4-py2.py3-none-any.whl
Collecting pyzmq>=13 (from jupyter-client->notebook)
Downloading pyzmq-15.1.0-cp27-none-macosx_10_6_intel.whl (1.3MB)
100% |████████████████████████████████| 1.3MB 30kB/s
Collecting jsonschema!=2.5.0,>=2.0 (from nbformat->notebook)
Downloading jsonschema-2.5.1-py2.py3-none-any.whl
Collecting MarkupSafe (from jinja2->notebook)
Downloading MarkupSafe-0.23.tar.gz
Collecting pygments (from nbconvert->notebook)
Downloading Pygments-2.0.2-py2-none-any.whl (672kB)
100% |████████████████████████████████| 675kB 729kB/s
Collecting mistune!=0.6 (from nbconvert->notebook)
Downloading mistune-0.7.1-cp27-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (418kB)
100% |████████████████████████████████| 421kB 32kB/s
Requirement already satisfied (use --upgrade to upgrade): six in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from singledispatch->tornado>=4->notebook)
Collecting functools32 (from jsonschema!=2.5.0,>=2.0->nbformat->notebook)
Downloading functools32-3.2.3-2.tar.gz
Installing collected packages: decorator, ipython-genutils, traitlets, path.py, pickleshare, simplegeneric, gnureadline, appnope, ptyprocess, pexpect, ipython, backports.ssl-match-hostname, singledispatch, certifi, backports-abc, tornado, jupyter-core, pyzmq, jupyter-client, functools32, jsonschema, nbformat, MarkupSafe, jinja2, ipykernel, terminado, pygments, mistune, nbconvert, notebook
Exception:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/basecommand.py", line 211, in main
status = self.run(options, args)
File "/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/commands/install.py", line 311, in run
root=options.root_path,
File "/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/req/req_set.py", line 646, in install
**kwargs
File "/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/req/req_install.py", line 803, in install
self.move_wheel_files(self.source_dir, root=root)
File "/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/req/req_install.py", line 998, in move_wheel_files
isolated=self.isolated,
File "/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/wheel.py", line 339, in move_wheel_files
clobber(source, lib_dir, True)
File "/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/wheel.py", line 317, in clobber
shutil.copyfile(srcfile, destfile)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 83, in copyfile
with open(dst, 'wb') as fdst:
IOError: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/decorator.py'
This looks like a permissions problem - while not a Mac user I think that you may get around this by simply using:
sudo pip install ipython notebook