[Windows 8 Python 2.7.9]Unable to install modules via pip - python

I am a python newbie who is trying to install packages via pip. I changed the PATH to C:\Python27\Scripts in the Advanced system settings and typed pip in cmd, e.g. pip install pylab. However, after the package being cleaned up, a long red message is pop up as sth similar as follows,
Exception:
Traceback (most recent call last):
(some context)
Storing debug log for failure in C:\Users\Username\pip\pip.log
and when I write "import pylab" in Python 2.7.9 Shell, this message shows up:
Traceback (most recent call last):
File "", line 1, in
import pylab
ImportError: No module named pylab
May anyone tell me what's wrong with it and how I can fix it so that I can install and import modules in python?

Related

Problem using installed packages with PIP (possibly due to two Python versions)

When I try to use installed packages in Python, I nearly always run into the same error.
So I e.g. install a package like this: pip3 install mathplot and when I afterwards want to use it in Python3 (I use python3 in the command prompt), I run into the ModuleNotFoundError:
>>> import mathplot
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'mathplot'
But when I run just python, the module is found and ready to use.
Any idea where this problem comes from and how I can get rid of it?
Thanks in advance

my pygame doesn't download; I get a traceback error

I'm trying to install pygame. I now need to type import pygame into the terminal, but then I get this error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'pygame'
How do I fix this?
You can try this out,
Open Windows explorer
go to the python/scripts folder, where you've saved it.
Over there type cmd in the address bar and then a cmd window with the same directory will pop up
Now you need to go and again install pygame by the following command:
C:\python34\scripts> python -m pip install pygame
Now, the final step is to check it out in your favorite ide by the command.
import pygame
print (pygame.ver)
if it works you're good to go.

Problem importing a specific library with python 2.7.10

I am trying to install the following package in my MacOS High Sierra 10.13.6:
https://github.com/Michalychforever/CLASS-PT
When i run the make file everything looks to work fine. It not only generate an executable, which i can run by terminal using the ./ command, but also a python wrapper. The problem is related only with the former.
When i try to import the library i get the following message:
import classy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: dlopen(/Users/thiagomergulhao/Library/Python/2.7/lib/python/site-packages/classy.so, 2): Symbol not found: _zdotu_
Referenced from: /Users/thiagomergulhao/Library/Python/2.7/lib/python/site-packages/classy.so
Expected in: flat namespace
in /Users/thiagomergulhao/Library/Python/2.7/lib/python/site-packages/classy.so
I am using the built-in python version (i.e 2.7.10). I already installed the Xcode 10.1 together with command line commands. My .bash_profile is:
export PATH="/Users/thiagomergulhao/Library/Python/2.7/bin:$PATH"
export PATH=/usr/local/bin:/usr/local/sbin:$PATH
Does anyone have any ideia what is causing this problem?

ModuleNotFound error even pip is already used

I am a new at Python and I have a roblem with installing one framework.
https://github.com/zalando/connexion
I have already used the command in the terminal 'pip install connexion'
But still when I try to start a programm I get such error:
PS C:\Users\fele\OneDrive\Desktop\Python\Uebergabe\pYTHON_BACKEND_2020_03_12> & "C:/Program Files (x86)/Python37-32/python.exe" "c:/Users/fele/OneDrive/Desktop/Python/Uebergabe/pYTHON_BACKEND_2020_03_12/test_local/test_local_application_hook.py"
Traceback (most recent call last):
File "c:/Users/fele/OneDrive/Desktop/Python/Uebergabe/pYTHON_BACKEND_2020_03_12/test_local/test_local_application_hook.py", line 9, in <module>
from cwsm import connexion_manager
ModuleNotFoundError: No module named 'cwsm'
Cannot anybody give me a suggestion why is it happening?
Thanks in advance
The github page shows:
import connexion
So your import is wrong, try using connexion.
Source:
https://github.com/zalando/connexion#running-it

Error during library import in Python (Windows)

I am trying to configure svn hook for email notification using mailer.py script from apache, but it always crash on import of svn libs. I try two ways of installing svn and python. I try to install everything manually using command line and use CollableNet installer that have preinstalled Python and all libs I need but result is the same.
Now I try to import one library from hole package that I need using python in command line and I have such response:
>>> import svn.core
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named svn.core
I try to fix it using:
1) import sys; sys.path.append("C:\csvn\lib\svn-python\svn")
and
2) C:\csvn\lib\svn-python\svn>python "\__init__.py" install
But it didn't help.
For now I have no package with setup.py to install it.
I spend a lot of time on this task, and going crazy a little). Please give me any suggestion how to fix it.

Categories

Resources