I installed tensorflow using Ananconda3 command prompt (by creating environment named tensorenviron).
But when i try to import tensorflow module in Python script using IntelliJ, it shows no such module. Please help.
IntelliJ shows me the following:
In the above picture, I can select one of the SDKs. If i select Python 3.9 (tensorenviron - I installed it using anaconda3), I can only use tensorflow module and not pandas (installed separately through pip) and other modules. I can use pandas by selecting Python 3.10 SDK but then I lose tensorflow.
Python 3.10 path is shown in the above image
Python 3.9 (having tensorflow, installed through anaconda3) path is in above figure.
I have installed latest pip, but i didn't install tensorflow using pip.
Please help me install all under same path, but tensorflow doesn't seem to support Python 3.10
Related
I have a problem with importing TensorFlow. I have tried multiple versions of Numpy, Python, and TensorFlow and I still get the following error:
struct_pb2.TypeSpecProto.NDARRAY_SPEC
AttributeError: NDARRAY_SPEC
I have tried using conda and pip for installation and neither one works. I have no idea what might be the cause of this problem and it started happening about a week ago before that TensorFlow was working fine!
I believe you are using windows, and you have an incompatible version of tensorflow installed or you are missing a dependency. First make sure you have the following installed correct version of Visual C++ installed for your version of windows.
https://support.microsoft.com/en-us/topic/the-latest-supported-visual-c-downloads-2647da03-1eea-4433-9aff-95f26a218cc0
https://aka.ms/vs/16/release/vc_redist.x64.exe here is the direct link.
If it still doesn't work, enable longpaths,
https://superuser.com/questions/1119883/windows-10-enable-ntfs-long-paths-policy-option-missing
If you are having a clash with other packages, create a new conda environment first if you haven't already, and install tensorflow like this.
conda create -n tfenv
conda activate tfenv
conda install tensorflow
Then try to import tensorflow as tf again.
I am using macOS Sierra(on GPU support) with python3.7.0 installed.
Whenever I am trying to install tensorflow with the following command,
pip3 install tensorflow
I am getting the following issues:
Could not find a version that satisfies the requirement tensorflow (from versions: )
No matching distribution found for tensorflow.
Any help or suggestions are welcome.
Tensorflow does not support Python 3.7 yet. Use Python 3.6. See https://github.com/tensorflow/tensorflow/issues/17022.
I'm using Python 3.6 v in Ubuntu 18.04LTS. I installed numpy package using pip. When i used Python 3.6 interpreter it throws
ModuleNotFoundError: No module named 'numpy' and for Python2.7
interpreter it didn't throws any error. Any suggestions will be very helpful. I searched in google and github nothing helped me.
Based on the outputs you posted -
your pip and python are pointing to version 2.7
if you try pip install numpy you will install into your python 2.7 env
if you start python interpreter by default you'll be starting python2.7 and you should be able to find numpy package installed.
if you want to do the same in python3.xx use python3 , pip3 or use
virtual environments
Trying to plot the data from ros topics in a rosbag file. My system by default had Python 2.7 and I installed Python 3.5 just to work with Jupyter notebooks.
Now I have installed several packages twice, once for Python 2 and again for Python 3. Although most packages are compatible with both versions of Python, I am beginning to wonder if all the ros packages are compatible here.
For the image in this question, initially I was getting an error 'No module named 'rosbag_pandas'', then I installed it with pip3. Now I am facing the error shown in the image with regards to rosbag. I have searched high and low for a quick fix but to no avail. I read online that some packages only work with either Python 2.7 or with Python 3.5. Is that what's happening here?
FYI I have installed pyrosbag with pip and pip3 both. Still facing this issue. Could really use some help with this.
I faced the same problem and found a workaround for me. Basically, on top of the usual python 3 installation, install a python 2 kernel for jupyter notebook, as described here, as follows:
python2 -m pip install pip
python2 -m pip install --upgrade ipykernel
python2 -m ipykernel install
Not sure if there is indeed a python 3 package for rosbag but using the python 2 kernel you can import rosbag files to save them in another format for further processing in python 3.
I have already installed the anaconda module and it already has built-in pandas package that I want to make use of. I have python 3.6 installed in my machine. Environment variables for anaconda and python are set as well but I am still unable to import pandas on my python console.
Could anyone help me import the pandas? I can not make use of pip tool as I am working on my company's machine. Due to security issues, I am not allowed to download any package through pip. I want to make use of pre-installed anaconda module. Help me link my python to Anaconda.