-4

I have so many weird problems with python. I installed moviepy and when I want to run the code using Spyder, it says this no module named moviepy. But, when I run the code on the terminal, everything is fine.

My other problem is that I installed jupyter notebook and jupyter lab, but when I want to open them up using the commands "jupyterlab" or "jupyter-lab" or "jupyter lab" or "jupyter" it says for example:

'jupyter' is not recognized as an internal or external command, operable program or batch file.

can you please help me solve these problems?

Thanks,

Masoud

Also, I just set the environment variable and added:

C:\Users\masou\AppData\Local\Programs\Python\Python38-32
and C:\Users\masou\AppData\Local\Programs\Python\Python38-32\Scripts\

to the path.

  • It is common for an IDE to have its own installation of Python, separate from the one you installed. If so, there must be a way in the IDE to install packages. Are you able to start Jupyter through the Start Menu? – Tim Roberts Feb 24 '23 at 18:51
  • `import os; print(os.path)` in both of your python environments will tell you what's going on. likely, spyder has its own install or virtual-environment, and you'd like to use `pip install` within that virtualenv (presumably through the Spyder IDE somewhere.) – Kaia Feb 24 '23 at 18:52
  • Question titles should concisely summarize the question so other users can decide whether they should click or not. Please [edit] your question and give it a better title. See [ask]. – ChrisGPT was on strike Feb 24 '23 at 19:27
  • Also, [please ask only one question at a time](https://meta.stackexchange.com/q/39223/248627) – ChrisGPT was on strike Feb 24 '23 at 19:28

1 Answers1

0

For your first problem with moviepy, it sounds like Spyder may not be recognizing the path to the moviepy module. You can try adding the path to the moviepy module to Spyder's Python path.

To do this, go to the "Python interpreter" section in Spyder's preferences, and then click on the "Consoles" tab. From there, click on the "Advanced settings" button, and then on the "PYTHONPATH manager" tab. Click on the "Add Path" button and add the path to the folder where moviepy is installed.

For example, if moviepy is installed in the "C:\Python38\Lib\site-packages\moviepy" folder, you would add "C:\Python38\Lib\site-packages" to Spyder's Python path.

For your second problem with Jupyter, it sounds like Jupyter may not be added to your system's PATH environment variable. You can try adding the Jupyter directory to your system's PATH variable. To do this on Windows, follow these steps:

  1. Open the Start menu and search for "environment variables".
  2. Click on "Edit the system environment variables".
  3. Click on the "Environment Variables" button.
  4. Under "System Variables", scroll down and find the "Path" variable, then click "Edit".
  5. Click "New" and add the path to the directory containing the Jupyter executable (e.g. "C:\Users\YourUserName\AppData\Local\Programs\Python\Python39\Scripts").
  6. Click "OK" on all the windows to save the changes.

After adding Jupyter to your PATH, try running the "jupyter" command again in the terminal or command prompt to see if it works.