I cannot install tensorflow in pycharm on windows 10, though I have tried many different things:
went to settings > project interpreter and tried clicking the green plus button to install it, gave me the error: non-zero exit code (1) and told me to try installing via pip in the command line, which was successful, but I can't figure out how to make Pycharm use it when it's installed there
tried changing to a Conda environment, which still would not allow me to run tensorflow since when I input into the python command line: pip.main(['install', 'tensorflow']) it gave me another error and told me to update pip
updated pip then tried step 2 again, but now that I have pip 10.0.1, I get the error 'pip has no attribute main'. I tried reverted pip to 9.0.3 in the command line, but this won't change the version used in pycharm, which makes no sense to me. I reinstalled anaconda, as well as pip, and deleted and made a new project and yet it still says that it is using pip 10.0.1 which makes no sense to me
So in summary, I still can't install tensorflow, and I now have the wrong version of pip being used in Pycharm. I realize that there are many other posts about this issue but I'm pretty sure I've been to all of them and either didn't get an applicable answer or an answer that I understand.
you can try to follow the steps from "Pycharm anaconda import tensor flow library issue" for solve your issue ("You need to do these following steps:")
what worked for is this;
I installed TensorFlow on the command prompt as an administrator using this command pip install tensorflow
then I jumped back to my pycharm and clicked the red light bulb pop-up icon, it will have a few options when you click it, just select the one that says install tensor flow. This would not install in from scratch but basically, rebuild and update your pycharm workspace to note the newly installed tensorflow
Related
Today, I was trying to install Python 3.10.1.
I was successful in this, but, then, as I was installing Flask, pip will tell me that it installed, then, when I run the script, it says nothing is installed.
After a while, I realized I was running my Python scripts in Python 3.10.1, but I was running pip in Python 3.7. I did as this post said and ran pip --version to discover this.
I ran pip show flask to see where the module is, and it's in the Python 3.7 folder.
However, when I tried to uninstall Python 3.7, I can't find it in my start menu or in Control Panel > Programs > Programs & Features. I believe I had uninstalled it a long time ago.
To counteract this, I did as some YouTube video said (I lost the link to it) and re-installed Python 3.10.1, checked the "Add to PATH" option, checked to install for all users, and checked on the pip install.
After doing this, I upgraded my pip version to the latest version, uninstalled Flask, and re-installed it.
It was still installed in the Python 3.7 folder.
Next, I decided I will just uninstall PIP.
I ran CMD as an Administrator and typed pip uninstall pip as instructed here.
However, when I did this, it says I'm missing access to the places it wants to modify.
I found that strange, so I checked if I'm actually running it Administrator, and, yes, I am.
I looked at the directories that it wants to modify and gave ADMINISTRATORS ownership of all of them.
Absolutely nothing changed and did it again.
I gave myself ownership of it and did it again.
Absolutely nothing changed.
Then, I decided to run pip uninstall pip again. It says pip is not installed. That's strange.
I typed pip, and the help command for pip shows up.
Then, I (probably stupidly) went to all the directories and files PIP listed that it wants to uninstall, and manually deleted them, then uninstalled Python 3.10.1, and made sure to install PIP from there.
And now we're back at Python 3.7, and pip still isn't installed somehow.
I don't know what's happening. I haven't coded anything in Python for 2 or 3 years, and I want to try again, but this is starting to confuse me. Could anyone help?
Edit: Based on the suggestion of one of the answerers, I tried to manually delete pip. I couldn't find it in %APPDATA%, but pip --version shows me the path.
I tried deleting pip from there, but it says I need permission from ADMINISTRATORS. I am an administrator on my computer -.-
Anyways, I tried to take ownership of the folder, but nothing ever came of that.
Try to locate %APPDATA%\pip\pip by typing it into the file explorer. Pip will be located there, and you should be able to delete it.
I've managed to fix the issue.
I found that if I press this button in the start menu search for Python 3.7, it's possible to uninstall it from there (Control Panel said it uninstalled it when I used that, but it didn't).
I think I had installed Python from the Microsoft Store, which is why I couldn't find it in %APPDATA%.
Once I did that, I tried to uninstall Python 3.10 then re-install it. It kept saying it's installed, but it wouldn't show up in Command Prompt.
I fixed this by installing Python 3.10 from the Microsoft Store instead.
This fixed the problem.
I've been trying to fix this problem for a WHILE now. I've been looking online and trying anything I could find – from uninstalling and reinstalling pip, to uninstalling and reinstalling python – and I still can't find any solution. This only began after I updated my MacBook Pro to macOS Catalina (currently on 10.15.5) so I'm thinking this might be a permissions issue. Basically, I'll pip3 install a python module (or pip install – I've tried both, neither work) and I still get the "no module named ____" error afterwards. Currently on VSCode, but I've tried Idle, or even just running the file in terminal and nothing works.
Let me know what I could do, or if there's any more info I should provide!
Edit: Here is what I get for "which python" and "which python3", I dunno if that's related to the problem in any way but here you go:
$ which python
> /Users/asaflebovic/opt/anaconda3/bin/python
$ which python3
> /Users/asaflebovic/opt/anaconda3/bin/python3
If you want to install a package inside anaconda environment, I think you should have used conda instead of pip. As for checking whether tweepy is really installed or not, activate anaconda environment and then run conda list. If tweepy is listed there then you should be able to import tweepy.
And be sure to remember when you run the code you should always activate the environment where the package required by that code is located.
ps: actually you didn't need to install anaconda.
I've made multiple attempts to install Miniconda on my Macbook running Catalina. I've been following this guide on YouTube about how to install it. The area where I run into issues is when the installation completes and I have to restart the terminal. According to the video, this should allow me to use the conda command in the terminal itself, thus allowing me to do what I need to do. The error message I receive is below:
ERROR: The install method you used for conda--probably either pip
install conda or easy_install conda--is not compatible with using
conda as an application. If your intention is to install conda as a
standalone application, currently supported install methods include
the Anaconda installer and the miniconda installer. You can download
the miniconda installer from https://conda.io/miniconda.html.
What confuses me most about this is the fact that I have done this exact step. This current installation is from the link they provided. Has anyone else run into any issues like this?
I have installed TensorFlow using 'pip install TensorFlow' command in my command prompt. But it just exits out when I am trying to import TensorFlow without showing anything. Kindly help me resolve it. I have also attached the image which displays it. The last 3rd line is used for checking whether TensorFlow is correctly installed or not. But it doesn't show anything.
Please check error here
I suppose your virtual environment does not have pip and it would have referenced the global pip and this this would have been installed globally. Can you check running where pip on your windows and cofirm that it does belong to your virtual environment ?
I have Python27 installed in Windows 7
I am trying to build a reddit bot using this tutorial
I found instructions on how to install pip for windows from here
The page says that after installing pip, I can use pip freeze to check if the installation went correctly
It says pip freeze should display some information as shown below
Microsoft Windows [Version 6.2.9200] (c) 2012 Microsoft Corporation.
All rights reserved.
C:\Users\Username>cd c:\Python27\Scripts
c:\Python27\Scripts>pip freeze
antiorm==1.1.1
enum34==1.0
requests==2.3.0 virtualenv==1.11.6
However pip freeze doesn't show me anything at all
Did pip install correctly, or is there any problem? Is there any other way i can test proper installation?
If you want to test it thoroughly, you can use your actual pip installation to install something. For example, numpy would be a good sized example that can rule many problems out.
> pip install numpy
Now, run pip freeze again to check if pip is working as expected. It should then have something to show.
If you want to test it even further, you can open a terminal and
> python
> import numpy
That should be the complete test of your pip installation.
Additionally, whenever I install a new tool in my stack, I like to validate its path with where <executable name> (on Windows) and which <executable name> (on Linux). There are some compilers like Java that are always conflicting with other installations (like crazy, to the point that a complex setup may sometimes have to inject an absolute path to enforce the use of the correct version).
Also, asking the executable for its version can rule many other problems out. In your case, you can use pip --version to check which version you got and compare it to the stable or latest, according to what you want to use.
windows is a confusing piece of software if your coming from a Linux background... the solution that worked for me is the following
pip list
The problem you are facing is that if you only have de default packages in your installation lets say pip, wheel, pip freeze does not have anything to freeze at the moment so that's why dont show anything. try to install a new package then run the command again.