Issues installing Jupyter Notebooks - Python 3.9 - Windows 10 - python

I am having issues installing Jupyter Notebook. I will preface this by saying I have an elementary understanding of coding and how to properly set up my environment. When using the pip command pip install jupyter it begins processing, but I end up with the following error. One issue that I may have is a long file name, but I am unsure how to correct that considering I have never physically used this path. I also have a space between my first and last name in my user folder which may be causing the issue. It is my understanding that changing my username could cause unanticipated downstream issues, so I have not tried to change it.
ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: 'C:\\Users\\FirstName LastName\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python39\\site-packages\\jedi\\third_party\\typeshed\\third_party\\2and3\\requests\\packages\\urllib3\\packages\\ssl_match_hostname\\_implementation.pyi'
I have also tried the following syntax which both end with the above error
pip install --upgrade --force-reinstall jupyter
pip3 install --upgrade --force-reinstall jupyter
I tried installing both Anaconda and git bash. When I try to open through Anaconda, it acts like it is processing to open, then just stops and nothing happens.
Using git bash, I have tried the following command. I don't get any errors, but it also does not solve my problem.
Anaconda3/Scripts/activate
This seems to be a pretty common problem, so I am surprised I haven’t been able to solve it myself. What am I missing?
Edit: This is solved, thank you #Dschoni. Using the Anaconda prompt, I typed jupyter notebook and it opened.

I was getting this error when I installed Python on my Windows 10 machine through the Microsoft Store. Once I uninstalled it and installed the version downloaded from the official https://www.python.org/downloads/ this error did not happen anymore.

Related

Why doesn't import gym work; however, the command pip install gym was done and executed

I have went to the terminal and used,"pip install gym", and it successfully installed gym . When I go to use the, "import gym," command, I get an error when running the code at that line.
Exception has occurred: ModuleNotFoundError
No module named 'gym'
I have looked at other posts and they all say it should work after ruining,"pip install gym." Although mine successfully installed, it still doesn't work.
You need to verify that you are using the same version of python that you did pip install with. In VS Code, you can select the Python version in the upper right corner. Simply type "python --version" into the console to verify the version. You might want to use Anaconda because someone libraries like Tensorflow only fully-support Anaconda.
if you have pip installed it, there is no way that it will not work. Unless you've installed it to a virtual environment and running your program without it and vice versa. Or you've installed to a different version of python on your system.

Cannot install reportlab in pycharm(venv) on macOS

The problem
Right now I am trying to set up a virtual development environment on a macOS in pycharm.
The issue that I am facing is with this command
pip install -r requirements.txt
I am using python 2.7 right now and I am needing to install reportlab==2.4
I also get an error message when I try to install reportlab outside of pycharm and outside of my venv, that is if I explicitly do
pip install reportlab==2.4 in the terminal
I will include some of the screenshots of the errors but it is about 800+ lines of output going through the process of copying, creating, and displaying syntax error messages/other errors.
Something else that I have noticed is that a lot of the errors start with 'cc' which might be an issue because I am writing in pycharm on a mac and there might be some dependencies that I am missing/I don't have support for C code somewhere? I have installed xcode command tools already but the version of gcc might be too new/too strict? the version is xcode-select version 2384
I have tried a lot of things to get this working but cannot seem to crack it.
I will try to answer questions as I see them but in the meantime, if you have any suggestions, I am open to anything.
Thanks!
** UPDATE **
I did see that most of these were just warnings.
I managed to find a command that suppressed these warnings and allowed reportlab==2.4 to install correctly.
CFLAGS="-Wno-error=implicit-function-declaration" pip install reportlab==2.4

How to fix "Distutils was imported before Setuptools" when opening a .ipynb file?

If I try to open my Rscript.ipynb file via Windows Explorer I get the following warning and my file does not open.
c:\Users\kirst\anaconda3\lib\site-packages\setuptools\distutils_patch.py:25 UserWarning: Distutils was imported before Setuptools. This usage is discouraged and may exhibit undesirable errors. Please use setuptools 'objects directly or at least import setuptools first.
If I first open the Jupyter Notebook using a shortcut with the following target
C:\Users\kirst\anaconda3\python.exe C:\Users\kirst\anaconda3\cwp.py C:\Users\kirst\anaconda3\envs\R C:\Users\kirst\anaconda3\envs\R\python.exe C:\Users\kirst\anaconda3\envs\R\Scripts\jupyter-notebook-script.py "%USERPROFILE%/"
and then open the notebook by browsing to it, I don't have problems.
How do I set up to be able to open the file from explorer?
I found a solution at https://www.gitmemory.com/issue/brian-team/brian2/1213/673490152
You need to upgrade to the latest version:
pip3 install --upgrade pip setuptools
and the warning will disappear.
I'm copy-pasting an answer from a github user with the same problem and this solution
seemed to work like a charm for me.
Here is what you need to type on your command prompt:
pip uninstall pyzmq
(you might need to confirm the choice by entering y) and once that is done type:
pip install pyzmq
it might help. I had a similar problem while opening jupyter notebook. that fixed it.

Unable to downgrade python from 3.7 to 3.6 or 3.5

Firstly, my anaconda got corrupted with error along the line of activate.bat is not recognized as internal or external code.
Then, I read about the error, and conclude that the easiest and most common way to solve is to reinstall. So, I reinstalled it 4 times. Everytime, it failed after I entered conda install python=3.6 or conda install python=3.5
I also run it with administrator privileges. Also, I deleted all python and anaconda versions.
Additional information that may be helpful. Before anaconda corrupted for the first time, I was running running conda install tensorflow on python 3.6 or 3.5 version. But while it was running in pycharm's terminal. I accidentally closed Pycharm. That's when I realised my anaconda had been corrupted.
Below is a screenshot of the error.
And this is what happen when I open anaconda prompt after the error appeared.
Any clues or helps to get me in the right direction would help. I really need to make it work. I have deadline coming up next week!!!!
for now, I can use "conda create name_of_env python=3.6." to create virtual environment. But if anyone can provide me with a way to fix this problem. I still want to read about it.

Installed required packages on the host system but facing missing packages issue in Jupyter Notebook

I have all the packages required to run the ipynb file on my computer, but while I run the notebook file, I get the error message 'No module named 'plotly'' (for example).
'plotly' has actually been installed on the system, and even if I install it in a previous step in the notebook file, I get the same error message.
I am not really sure if it is a problem with sync between the system and notebook file or I'm missing something really obvious here.
The same holds true many other packages and libraries.
Any help would be appreciated.
Indeed the problem was that most of the packages were installed, by default, for Python 2. I had to re-install all the packages separately for Python 3 (Jupyter Notebook).
pip install package-name
pip3 install package-name
Not all the packages are available for Python 3 but thankfully, all the ones I needed were easily obtained. Hope this helps someone and thank you all for the suggestions :)

Categories

Resources