I'm new to Python. I've been trying to install the package pyodbc but I am not having any luck. Using pip, I can install the package pyperclip. When I use "pip install pyodbc" I get a PYD and PYI file. I can "import pyperclip" into my application but when I "import pyodbc" I get a ModuleNotFoundError. I have the latest versions of Python 3 and pip.
In your response, please be as specific as possible and don't make any assumptions that I will know what you are talking about since I am new to Python.
Thank you for any help that you can give.
Tom
Gord,
I'm sorry but my information above was totally incorrect. I thought that the MU editor ran the "import" command, but I didn't execute it properly.
Below is what I have when I try to "pip install pyodbc" along with a list command:
C:\Users\Tom>pip install pyodbc
Defaulting to user installation because normal site-packages is not writeable
Collecting pyodbc
Using cached pyodbc-4.0.32-cp310-cp310-win_amd64.whl (72 kB)
Installing collected packages: pyodbc
Successfully installed pyodbc-4.0.32
I ran the "list" command.
C:\Users\Tom>pip list
Package Version
pip 22.1
pyodbc 4.0.32
pyperclip 1.8.2
setuptools 58.1.0
C:\Users\Tom>
When I try to import the pyodbc package in the MU editor I still get the ModuleNotFounrError.
Sorry for the confusion.
Tom
Related
Getting this error in my Jupyter Notebook
What would be the best way to fix this utilizing conda instead of pip
I've attempted conda upgrade --all and that didnt seem to work
The scipy.sparse.*_array functions were introduced with v1.8. The networkx package started requiring scipy >=1.8 with v2.7. So, either upgrade SciPy
conda install 'scipy>=1.8'
or downgrade NetworkX:
conda install 'networkx<2.7'
Part of the issue here is that, at the recommendation of a networkx developer, Conda Forge stopped explicitly requiring scipy as a dependency of networkx, and therefore there is no longer any constraint. I opened an issue on the feedstock to revisit coinstallation constraints (run_constrained specifications).
As mentioned in this Github comment, I was trying to calculate the page rank (networkx.pagerank) of a graph on Google Colab when I encountered the same error. After executing the following code, the issue was resolved for me:
!pip install --upgrade scipy networkx
A Side Note: pip install refers to installing packages and leave the package as-is if it is already installed. But the --upgrade flag instructs pip to uninstall anything which is being upgraded/replaced. For more info on this, refer this official doc.
I encountered similar error
I could solve it by installing these versions of newtorkx and scipy:
!pip install 'networkx<2.7'
!pip install 'scipy>=1.8'
I used this instruction to install spacyr on RStudio (mac os)
I have both python 2 and 3 so I run
library(spacyr)
spacy_initialize(python_executable = "/usr/local/bin/python")
It returns an error:
Error in check_spacy_model(python_executable, model) :
/usr/local/bin/python is not a python executable
Any advice on how to fix it? Thanks.
I spent a lot of time figuring out this issue for myself. For me the problem was I had installed spacy using conda rather than pip so it was unable to setup symlink.
uninstall spacyr
uninstall spacy from python(if you have installed using conda)
Install spacy with pip only
Install the latest version of spacyr from github.
I am facing a problem while installing openstack through devstack script on my Ubuntu 15 lts.
It says:
sorry, but this version only supports 100 named groups" AssertionError: sorry, but this version only supports 100 named groups ---------------------------------------- Rolling back uninstall of cryptography
Hi this is due to a pycparser 2.14 package update on pypi today. More details can be found in [1] and [2].
[1] http://lists.openstack.org/pipermail/openstack-dev/2016-October/104909.html
[2] https://github.com/eliben/pycparser/issues/147
Workaround to fix it is to change "pycparser===2.14"in /opt/stack/requirements/upper-constraints.txt to "pycparser===2.13"
Using pip to change the version will not work, because DevStack will uninstall 2.13 version and update it to 2.14, as required in the above file.
========================================================================
Update on 10/4(JST):
according to the update in [2], this bug has been resolved. :)
It's an issue with pythons pycparser lib, install the previous version by setting pycparser==2.13 in your requirements.txt file or via pip.
I have same problem and I resolve this issue after removing 'pycparser' package, using below command:
pip uninstall pycparser
The source package of pycparser doesn't have this problem, only the wheel seems to fail.
Using the --no-binary in your installation command or requirements file should make it work too.
I added --no-binary pycparser in the end of my requirements file and it did the job.
Just adding this so that it may help someone...
Our Devstack also failed because of this pycparser bug. We have just downgraded pycparser to 2.13 in requirement.txt/upper_requirement.txt and disabled 'tempest' service(This service will install cryptography and pycparser) in local.conf. After this, our Devstack installation was successful.
NOTE: comment the line 'RECLONE=yes' in local.conf file.
Thanks
I have CentOS 7 (3.10.0-123.el7.x86_64) and I seem not be able to install R and then get Rstudio server working.
This is what I did:
rpm -Uvh http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum install R
Then I got this error:
Transaction check error:
file /usr/lib/systemd/system/blk-availability.service from install of device-mapper-7:1.02.107-5.el7_2.1.x86_64 conflicts with file from package lvm2-7:2.02.105-14.el7.x86_64
file /usr/sbin/blkdeactivate from install of device-mapper-7:1.02.107-5.el7_2.1.x86_64 conflicts with file from package lvm2-7:2.02.105-14.el7.x86_64
file /usr/share/man/man8/blkdeactivate.8.gz from install of device-mapper-7:1.02.107-5.el7_2.1.x86_64 conflicts with file from package lvm2-7:2.02.105-14.el7.x86_64
I am not sure what it is. There is nothing from whereis R because it didn't install.
If I install Rstudio Server, it would fail to start the service and said ERROR unable to find installation of R in the system
Can someone tell me how to install R properly on Centos 7?
That is not related to R. Your log shows a conflict between "device-mapper" and "lvm2", and these packages are used to operate with devices such as hard disks and partitions (before someone downvotes me, YES this is a crude simplification).
You should try to update your system with yum before installing R.
I resolved this problem by updating lvm2 firstly, then install R.
This idea was from: https://bugzilla.redhat.com/show_bug.cgi?id=1294128
Please help me installing cx_Oracle for python 3.4.
I am able to install it for python 2.7 using the below method.
https://www.youtube.com/watch?v=9DwbOozQrZ8
however it is not working for 3.4. Please help me.
First, make sure you have the instant client installed on your machine and you are able to connect to your database with SQL*Plus. Also make sure you have the instant client development package installed on your machine.
Second, run the command
pip install cx_Oracle
This will download the source package and build. If you are using the instant client nothing else needs to be done.
My Django 1.8.4 works perfectly with cx_Oracle Python 2.7 set on Linux, but it's not even mentioned that latest cx_Oracle supports Python 3.4 for Linux (for Win it does). As result attempt pip install cx_Oracle gets
distutils.errors.DistutilsSetupError: cannot locate Oracle include files