I've been trying to install python-pandas, got an error message:
install requires: 'python-dateutil < 2','numpy'
$ pip install 'python-dateutil < 2' 'numpy'
I'm new to slackware (like the steep learning curve), so I got the binaries from various websites, unpacked the files but I still keep getting this message. I do have a new directory titled 'usr' in my Downloads directory. I'm assuming that's supposed to go in the python directory but I'm not completely sure. Just lookin' for a little advice. Thanks.
My problem was not having pip installed...had to do a few tasks to get that done. But it's all working now.
Related
I am building a desktop app using Python and PySimpleGUI. So far, everything works just fine. Whilst I was working at the project, I realized I need to find a way to get the duration of some mp3 files and to display it in a certain way. I discovered mutagen module that is supposed to help me in this sense, I installed, and here the problem arise:
It throws me ModuleNotFoundError: No module named 'mutagen'.
Seeing this, I started to look for the problem, but I couldn't not understand why my interpretor did not find the module even though I Installed it CORRECTLY. (as PyCharm told me)
I have tried the following:
I am using a local virtual environment that has installed the dependecies for the project(and some extra) and I uninstalled and installed the package 3-4 times
I deleted the local virtual environment and I created another one. I installed the packages again and same issue.
I installed a random module (scipy) and I tried to import it somewhere in the project and it thrown me same error, but this time for scipy module
My guess is that I did not configured properly my interpreter, but to be honest, I have no idea what I am doing wrong, because I followed the same steps I've been using for creating a venv with its according interpreter and for other projects, it worked just fine.
Further details:
Using python3.9 base .exe
I installed the packages in two ways: one using the pycharm IDE, and one by running pip3 install mutagen
You may be using a different pip that is not the one that affects the Python you are using. Instead of using
pip install mutagen
Consider using pip as a module of the Python you are using:
python -m pip install mutagen
This way you'll be sure you are working on the same Python.
If you want to continue using plain pip, try which python and which pip to make sure they are referencing the same environment.
I was using the Project Gutenberg API (I'm new, forgive me if this isn't actually the right term) with Python 2 just fine. But I needed to start using Python 3 for other reasons.
I'm having a lot of difficulties getting Gutenberg to work with Python 3. I understand (according to this site: https://pypi.org/project/Gutenberg/) that I need to manually install BSD-DB, and I think that's the problem I'm running into.
brew install berkeley-db4
works just fine, but
pip install -r requirements-py3.pip
returns the error:
Could not open requirements file: [Errno 2] No such file or directory: 'requirements-py3.pip'
After research online, I also tried
BERKELEYDB_DIR=$(brew --prefix berkeley-db) YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION=yes pip install bsddb3
which returns the error:
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/gb/z8bwwygn0y5gcknl24_7bfz40000gn/T/pip-build-_VUMDe/bsddb3/
I'm sorta overwhelmed by all the things that could be going on and starting to feel my lack of coding knowledge. Any nudge in the right direction would be greatly appreciated.
I'm using Windows 7 and am up to date on patches. I was using Python 3.5.2 and wanted to upgrade to 3.6, so I went to the Python site, downloaded 3.6.4.exe for Windows, and ran it. The Python seems to work fine and is 3.6.4, but trying to import any of the packages I was using (pandas, numpy, tensorflow, etc) now gives me ModuleNotFoundError: No module named <whichever module it was>. Also, pip list now shows only pip and setuptools.
It appears to be a known issue, for example this from nearly a year ago, which suggests that I should "uninstall the python bindings and install again", but I can't figure out what that means. Fortunately I can still access 3.5.2 by using py -3.5, and then my imports work. Can anyone tell me how to fix this for 3.6 without having to reinstall all my modules manually?
I was thinking possibly I should have upgraded through pip; it seems like that's possible but maybe a bad idea for some reason? On further investigation it looks like what I should have done was save my requirements with pip freeze > requirements.txt, and then after installing the new Python restore them with pip install -r requirements.txt. Is this right?
Hard to say if you have an install problem, but this is what I would try if I were in your place.
Create a virtual environment as per; docs
c:>c:\Python36\python -m venv c:\path\to\myenv
Activate your virtual environment
C:> \Scripts\activate.bat
Run your application from within your activated environment. Each time you get an import error, do a pip-install from within the active environment. (For your own modules, you may need to modify PYTHONPATH in 'activate.bat')
Once you have your application running again, do your pip freeze > requirements.txt, and keep that with your project.
Each time you run your application, do so from within the activated virtual environment.
This will give you a clean requirements.txt that doesn't include a bunch of junk from other projects. Then, when you go to 3.7, just create the virtualenv and run your requirements.txt and wala!
I suspect your issue is simply not running against the correct interpreter, running from within a virtual environment should at least rule it out.
I tried to run a script using turtle module on pythonanywere.com, however, got stuck at an error that cannot find the module named "tkinter" and I need to install python3-tk package. I followed this tutorial installing new modules on pythonanywhere in attempt to install the package in Bash console on pythonanywere.com by running pip3.5 install --user package3-tk.
However, I got the error that "could not find the version that satisfies the requirement package3-tk".
I also tried to replace the package name with tkinter with no luck either.
You can't use the tkinter module from a server such as pythonanywhere. It needs to have a connection to a display and not just a browser window.
https://www.pythonanywhere.com/forums/topic/360/
Just learnt the lesson of finding answer by asking question in different way. My purpose is to use turtle module on pythonanywere, which is not possible as explained in the answer above. However, I just found out that pythonanywhere has an affiliate website that is free and supports turtle (www.trinker.io)
I'm trying to install SIP on my computer so I can proceed to get PyQt. I put the install files in a folder on my desktop ('C:\Users\User\Desktop\Programming\Sip\sip-4.15.5'). So, to install it, I ran the following commands from CMD:
cd C:\Python33
python "C:\Users\User\Desktop\Programming\Sip\sip-4.15.5\configure.py"
The version of python in 'C:\Python33' IS the one used in the command 'python'. Here's the output I got:
This is SIP 4.15.5 for Python 3.3.5 on win32.
The SIP code generator will be installed in C:\Python33.
The sip module will be installed in C:\Python33\Lib\site-packages.
The sip.h header file will be installed in C:\Python33\include.
The default directory to install .sip files in is C:\Python33\sip.
The platform/compiler configuration is win32-msvc2010.
Creating siplib\sip.h...
Creating siplib\siplib.c...
Creating siplib\siplib.sbf...
Creating sipconfig.py...
Creating top level Makefile...
Creating sip code generator Makefile...
Creating sip module Makefile...
Error: Unable to open
"C:\Users\User\Desktop\Programming\Sip\sip-4.15.5\siplib\siplib.sbf"
Now, the key lines are obviously the last two, so I looked in the appropriate folder and found that there was a rather good reason for the error: there is no "siplib.sbf." The closest it gets is "siplib.sbf.in". What on earth is going on? If this is a stupid question, please feel free to tell me so.
You must change current working directory to the sip-4.15.5 first:
cd C:\Users\User\Desktop\Programming\Sip\sip-4.15.5
python configure.py