I have a script that queries and updates an access table. I've used it successfully on my computer, but after installing anaconda and spyder on a different computer (same versions as the original installation on the original computer) it doesn't work on the new computer.
To clarify: I installed the package using
pip install sqlalchemy-access
on the anaconda prompt, and when running
pip list|findstr access
I get
sqlalchemy-access 1.1.3. However, when I run the script in spyder I get the NoSuchModuleError: Can't load plugin: sqlalchemy.dialects:access.pyodbc error.
Do you have several different python versions on your computer?
Maybe installing the package with
pip3 install sqlalchemy-access
Could fix this.
I don't know why, but after trying multiple times, I checked again (pip list|findstr access) and found that the installation of sqlalchemy-access, which I managed to find before in the anaconda prompt, has disappeared. I installed it again (for the third or fourth time) and now it works.
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.
Python Version: 3.2.3
I've spent hours working on this issue and I'm still scratching my head furiously out of confusion. I'm testing an application built with python in a windows 7 device. I went and installed python and its dependencies. I also installed pip and the following packages: mysql-connector, and mysqlclient. However, when I tried running the script that imports mysql.connector, the debugger returns:
import mysql.connector
ImportError: No module named mysql.connector
I went and check the list of packages via pip list and saw that the packages we're definitely installed. They are listed as:
mysql-connector-python 8.0.26
mysqlclient 2.0.3
So, I compared this with my windows 10 device that has the script running without issues and saw that the packages were also installed the same way. I thought there were no issues in the package installation.
However, when I checked the python modules in help("modules"), I found something. The mysql and pip are not listed in the windows 7 device whereas, in my personal device, they were there.
I tried uninstalling and reinstalling the packages, yet the issue remains. For some reason, python is not able to detect the packages. I also tried to upgrade the pip via python -m pip install --upgrade pip and as expected, the python can't find the pip. I'm honestly confused at this point. Am I missing something?
UPDATE
It might be worth noting that, since my python version has no pip, I had to install it and copy its path to the system environment variables manually. Could it be connected the source of issue?
I have recently uninstalled python 3.7 and installed python 3.9. After that, when I try to use pip to install any package, it keeps trying to use python37.exe, which is not installed anymore. I was able to solve that by using python -m pip install, but the same does not work when I try to launch jupyter notebook, which still tries to use python37. I cannot launch it using a similar command python -m jupyter notebook.
I was wondering if there is any solution to this, since I could not find anything related to that.
Thanks in advance.
Maybe try to install it again using your new pip like
pip install notebook
(Sorry not enough reputation for a comment)
This usually occurs when jupyter is installed with a specific version of python. The easiest / best solution is to uninstall jupyter, then reinstall it with the correct version of python.
In your case, you should consider using python3.9 -m pip install jupyter (after first uninstalling jupyter).
Just to give you all an update in case anyone is facing the same problem.
I was able to find some remaining files and files of the previous installation of Python 3.7 in my system that were not deleted for some reason during the uninstall process. I deleted them manually and my system started to recognize Python 3.9 to call pip and jupyter after that.
I'm using windows 10 and I got rid of python 3.8 and installed 3.7 as the only python version on my system.
When trying to install libraries using pip I now get the error:
Fatal error in launcher: Unable to create process using '"c:\users\user\appdata\local\programs\python\python38-32\python.exe" "C:\Users\User\AppData\Local\Programs\Python\Python38-32\Scripts\pip.exe" install pygame_menu': The system cannot find the file specified.
when I checked in the console which -a pip I got:
C:\Users\User>which -a pip
/cygdrive/c/Users/User/AppData/Local/Programs/Python/Python38-32/Scripts/pip
/cygdrive/c/Users/User/AppData/Local/Programs/Python/Python37/Scripts/pip
Now when I look for Python in my variable path it is alright...
Anyways I can't figure out how to change the path of pip so the right one is selected... besides its pretty weird that ive uninstalled python and pip multiple times and it still gets it wrong every time during installation.
Thanks
For me this solution did the job, thanks itsAPK
python -m pip install --upgrade --force-reinstall pip
The cause of this problem was me installing python from Microsoft store and having another version installed from the default installer, when I removed the Microsoft store version it was prompting me with errors.
to fix do this :
check if you still have the python38-32 folder in your local variable list
Delete the "%userprofile%\AppData\Local\Programs\Python\Python38" folder
run pip from command line
if the problem still persists then type "environment variables" in the windows search box
and add "%userprofile%\AppData\Local\Programs\Python\Python37" to your system variable named "Path"
This should completely fix your problem
if not
uninstall all the python files including py launcher
reinstall python # when installing you must select ADD PYTHON to system environment variable
When I was facing the same issue I fixed it by checking the python version pointed to by pip3.x executable. The pip3.10 was pointing to /usr/bin/python9 which was causing problems with package installation.
Just check if your pip3.x is pointing to the correct python version.
vim $HOME/.local/bin/pip3.10
Python version is on the first line (starting with the '#').
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?