"pythonw.exe entry point not found" when running spyder in an environment - python

Error Notification:
The proceduce entry point
?PyWinObject_AsWriteBuffer##YAHPEAU_object##PEAPEAXPEAKH#Z could not
be located in the dynamic link library
C:\Users\Admin\anaconda3:ibrary\bin\pythoncom38.dll
I was using virtualenv to create an environment for my Python project instead of using "anaconda navigator" because it takes me too long to switch and run spyder in it. So I installed spyder inside my environment with pip install spyder and ran spyder via my env prompt. The error message appears and, although it's still working, it's kind of annoying. What is the problem, and how I can fix it?

I'm having the same issue, and I've tested all new installations via pip that will encounter this issue. It seems the problem is related to creating the virtual environment on Windows OS.
As Ten Kho posted, the only error message is a pop-out window that says entry point error.
I fixed the problem by install scoop (guide can be found here https://scoop.sh/), and use scoop to reinstall python on windows. This fixed the pythoncom38.dll issue for me.

Related

The same python binary in two different terminals sees a different environment

I tried to run a jupyter notebook cell in vscode today and got
"Running cells with 'Python 3.10.6 64-bit' requires ipykernel package".
This is very strange, as my Jupiter laptop environment was still working yesterday. Also, I see all the python packages in their place. The only thing that has changed is that last night I updated the system packages through Pop!_Shop (Pop!_OS 22.04 LTS).
Running python3.10 I noticed that the version of the GCC inside the vscode terminal is different from the one in the system terminal. How is this even possible when the which command shows that the path to the binary is the same? Then I checked gcc --version itself and to my surprise the same thing happened to it.
from vscode terminal
from system terminal
sys.path in both terminals is the same, but one sees packages, for example requests, and the other does not.
I am sure that the original problem with the jupyter cell is related to this, because ipykernel is also in the sys.path, which is somehow inaccessible to the vscode's terminal and maybe jupyter extension.
For Jupyter I can switch to one of the venvs, where the problem disappears. But the magic with the binary in the terminals remains unclear.
EDIT:
The problem was solved by uninstalling the flatpak version of vscode and installing the fresh deb package from the official site. Now in vscode terminal I have the same compiler version as in the system terminal and the modules are found without problems, including ipykernel.
Solution is to reinstall vscode with deb package from official website. See the edited part of the question.

System can't find pip

I first installed Spyder and then afterwards Python on a server (with Windows Server 2019) all on the directory C:\Users\wi932. Now I want to use the command prompt to install packages (e.g. tensorflow) but unfortunately I get the error message that "the command pip is either wrongly written or can't be found "(translated). I am wondering why I get this error because on my normal laptop I type in the exact same commands and there everything is okay.
I have attached a screenshot of the command prompt. I tried to install the packages both in the spyder folder ( C:\Users\wi932.spyder-py3) and the Python folder ( C:\Users\wi932\Python\Python310). I always get the same error.
Does anyone of you have an idea what the problem might be and how to fix it? I'll appreciate every comment.
The directory containing pip is located in <Python directory>\Scripts. To make Windows find it, you need to check the "Add Python to PATH" checkbox during installation.
Some packages, including tensorflow, have no version for the last Python distro, so you need to "downgrade" it by installing an older version, for example, 3.8.
Try installing python in local download it at www.python.org then you can run any command with pip directly in local

Unable to start Spyder after conda update/install packages?

I was playing around with Spyder today, and ran ONLY the following in the cmd window:
conda update scikit-learn
conda install matlibplot --force
Both ran successfully, to completion. Now, all of a sudden, Spyder doesn't start after updating one package and installing one package. I rebooted my machine; sitll can't gte Spyder to run. Is there some kind of master reset, or some trick to manually get Spyder to statup? Thanks to all.
When I reun 'spyder --reset', I think it's supposed to reset everything. That's what I'm seeing from various posts. When I enter that into the Anaconda prompt, all I get is 'Python has stopped working. Windows is checking for a solution'. Then I have to close the error prompt, and that's then end of it. There should be an easy way to fix something like this. Literally, all I did was upgrade 2 packages. There's no way Python can be this unstable, or fragile.

Anaconda Installed but Cannot Launch Navigator

Anaconda (listed as "Python 3.6.0 (Anaconda 4.3.1 64 bit)" ) is in my programs and features list, but there is seeming no Anaconda Navigator desktop app, as their seems to be no icon on my desktop and I am unable to search for it through "Start". Could this be because I have the 32-bit version of Anaconda downloaded and I have a 64-bit OS (I thought I should do this because Python on my computer was 64-bit) or because I downloaded Anaconda under "users" instead of Desktop. I also downloaded Anaconda twice, if that could be causing some of the problem. I have a Windows 10 laptop, if that is any help.
Try to
source ~/anaconda3/bin/activate root
anaconda-navigator
https://github.com/ContinuumIO/anaconda-issues/issues/1580
Open up a command terminal (CTRL+ALT+T)
and try running this command:
anaconda-navigator
When I installed Anaconda, and read the website docs, they said that they tend to not add a file or menu path to run the navigator because there are so many different versions of different systems, instead they give the above terminal command to start the navigator GUI and advise on setting up a shortcut to do this process manually - if that works for you it shouldn't be too much trouble to do it this way - I do it like this personally
How I solved this issue:
1. Be connected to the internet.
2. Open the Anaconda Prompt (looks like a regular command window).
If you installed the .exe in your /name/user/ location you should be fine, if not navigate to it.
Then start an environment.
conda info --envs
Then run
conda install -c anaconda anaconda-navigator
Press y when prompted (if prompted). It will being downloading the packages needed.
Then run your newly installed Anaconda Navigator
anaconda-navigator
It should start, and also appear in your regular windows 10 apps list.
activate the virtual env with command:
conda activate base
run anacond anavigator
anaconda-navigator
when you will type anaconda in windows 10 search bar it will give you the list as
then in terminal you have to type anaconda-navigator as
it will start anaconda on your machine.
Yet another option which worked in my case on Windows 10: Try uninstalling your previous installation, restart the system and run the installation again. Make sure you don't start any programs before installing Anaconda. You will find the installation finishes without prompting any kind of errors.
Type in Anaconda in your Windows 10 Search bar. You will find Anaconda Prompt appear.
I figured out the reason as to why:
1-There seems to be no navigator icon
2-When conducting the above steps of running the "anaconda-navigator" command in prompt (whether cmd or Anaconda) it yields "anaconda navigator is not recognized as an internal or external command"
This was very frustrating to me as I'd installed the proper version multiple times with no avail.
To solve this problem :
in the installation process, there will be an advanced options step with 2 selections one of which is unchecked (the top one). Make sure you check it which will add the navigator to the path of your machine variables.
Cheers,
Hossam
it works :
export PATH=/home/yourUserName/anaconda3/bin:$PATH
after that run anaconda-navigator command. remember anaconda can't in Sudo mode, so don't use sudo at all.
I faced the same problem on Windows 10. As soon as I cleared my Path variable from edit environment variables option, the icon started to appear. It was occurring because I had previously installed python 3.6.1 on my computer and added it to my path variable as C:\Python36;C:\Python36\DLL; and so on. There isn't any need to uninstall Anaconda Navigator and start from scratch if you have correctly followed the steps mentioned at the documentation for it.
Try restarting the system! You will be able to find the navigator once you restart the system after installation.
Tried all solutions here but these 2 steps solved the issue:
1) manual update of open-ssl from here:
https://slproweb.com/products/Win32OpenSSL.html
2) update OpenSSL using conda update openssl command in the Anaconda Prompt
solved the issue!
I had a similar issue today where only the prompt was available after installation.
Finally solved this by un-installing my regular python installation and then install anaconda(anaconda 3 v5.2.0, with python 3.6).
I also have the issue on windows when i am unable to find the anaconda-navigator in start menu.
First you have to check anaconda-navigator.exe file in your anaconda folder if this file is present it means you have installed it properly otherwise there is some problem and you have to reinstall it.
Before reinstalling this points to be noticed
1) You have to uninstall all previous python folder
2) Check you environment variable and clear all previous python path
After this install anaconda
your problem will be resolved if not tell me the full error i will try to solve it
Uninstall your Anaconda, delete the folder where it was. Then reinstall it.
You might not be in a anaconda environment
Below is a link how to activate the environment from the official documentation
On Windows, in your Anaconda Prompt, run activate myenv
https://conda.io/docs/user-guide/tasks/manage-environments.html#activating-an-environment
And then run the anaconda navigator from the anaconda prompt by entering the command anaconda-navigator
100% Solved.
While Installing make sure you are connected to Internet.
If already installed anaconda, open the anaconda command prompt and type following command:
conda install -c anaconda anaconda-navigator
(internet connection is required)
Note: In some cases restarting may solve the issue of navigator.
This is what I did
Reinstall anacoda with ticked first check box
Remember to Restart
I have that error an the solution was to install the Win64 OpenSSL.
https://slproweb.com/products/Win32OpenSSL.html
Download and install Miniconda first from this link and later on download and install Anaconda. Then you will be able to see the navigator in your all programs list in the start menu. I hope this will help you. Let me know in case of any concerns.
In my case; it was available in the anaconda folder in "All App" from main menu
For people from Brazil
There is a security software called Warsaw (used for home banking) that must be uninstalled! After you can install it back again.
After thousand times trying, installing, uninstalling, cleanning-up the regedit that finally solved the problem.
First Run This Command
conda config --set auto_activate_base True
Then Run This Command
anaconda-navigator.
Turn off your internet connection, then open your terminal and type anaconda-navigator or type anaconda prompt in the search bar and double click on the anaconda prompt.
If anaconda is opened, then you can turn on your Wi-Fi.
I'm also faced with this issue. When I checked conda --version got a command not recognized error. Then I set the environmental variables as in https://stackoverflow.com/a/61372328/13370201. After that run anaconda navigator command. Then it started to initializing anaconda navigator.This tutorial also help for me.
I faced the same problem in Solus Baidge but I solved by activating the conda environment.
First activate
conda activate
Then run the navigator
anaconda-navigator
Make sure to run the installer as admin
In my case (Windows 11) it was a permission problem. Make sure to run the installer as administrator. You can check this by modification of the path in the installer process.
Further steps to handle the problem:
Uninstall your actual anaconda version.
Delete old Data found in:
C:\Users\YourUsername\AppData\Roaming
C:\Users\YourUsername
(In my case it was called .anaconda and .conda folder)
Restart PC
Install Anaconda as admin
The followng command solved my issue.
pip install --upgrade pywin32==228
On windows 10, I faced the same error - only Anaconda Prompt was showing in the startup menu. What I did is i re-installed Anaconda and selected install for all users of the pc (in my initial installation I have installed only for current user).
What finally worked for me was:
Uninstalling Anaconda
Deleting all files that has "conda" in them - most of them should be
located in: C:\Users\Admin
Delete especially the "condarc" file.
Reboot
Installed 32-bit installer (even though my system is 64-bit) and reboot
Finally worked. I have not yet re-tried with 64-bit installer, since I have a time critical project, but will do when again I have spare time.
P.S. what broke Anaconda for me was a blue screen I got while updating Anaconda. I guess it did not clear all old files and this broke the new installs.
I too faced a similar issue when I was not able to find the Anaconda Navigator Desktop app in the start menu. But do not worry , Go to start Menu and Type Anaconda Navigator. Now within the apps menu you will find anaconda navigator with its icon. Click on that. After clicking you will find a command prompt dialog opened and a .exe file runs on your machine. Wait till it completes.
The Anaconda Navigator app opens on your machine.

How to use a framework build of Python with Anaconda

I'm unable to get matplotlib animations to display on a Mac computer. I've chased down several attempts at installing ffmpeg but they've all failed and I'm starting to wonder if that isn't the wrong way to solve the problem.
I found this page.
Since I'm running Python from the Spyder app in Anaconda, the section for this seems relevant. It says
The default python provided in (Ana)Conda is not a framework build.
However, the Conda developers have made it easy to install a framework
build in both the main environment and in Conda envs. To use this
install python.app conda install python.app and use pythonw rather
than python
I'm not perfectly clear on what this means, but I opened a terminal, ran conda install python.app and it seemed to work--at least there were no error messages. I could navigate to a folder that contained the file python.app.
I'm not clear on what it means to "use pythonw" but I navigated to the animation I'm trying to compile and ran $ pythonw anim.py and it gave me an I/O error. I'm not sure if I'm supposed to use pythonw in some other way, or what. If I restart and try to run the code in Spyder I get the same error as before.
I know that the code works, because I've run it on a Linux machine that has ffmpeg and it worked.
Is there something else I need to do to get a framework build, whatever that means?
After installing the framework build, you have to change the location of your python interpreter from python to pythonw. I am not familiar with Spyder, but in VS code I solved this issue modifying the settings.json file from
{
"python.pythonPath": "/Users/[username]/miniconda3/envs/base-evn/bin/python"
}
to
{
"python.pythonPath": "/Users/[username]/miniconda3/envs/base-evn/bin/pythonw"
}
I am using minicoda. For anaconda, the folder in your home directory might be named one of the following:
anaconda2.
anaconda3.

Categories

Resources