As I said, I am working in Python 3.3 and I was wondering if anyone can help me getting the pip module working.
When I look at the list of available modules using: help('modules'), the list contains "pip".
When I then try to "import pip" or "pip install 'module name'" (obviously w/o the quotes) I get error messages.
When I type "pip install beautifulsoup", I get:
pip install beautifulsoup
SyntaxError: invalid syntax.
When I try:
"import pip", I get:
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
import pip
File "E:\lib\site-packages\pip\__init__.py", line 9, in <module>
from pip.log import logger
File "E:\lib\site-packages\pip\log.py", line 7, in <module>
from pip import backwardcompat
File "E:\lib\site-packages\pip\backwardcompat\__init__.py", line 27, in <module>
console_encoding = sys.__stdout__.encoding
AttributeError: 'NoneType' object has no attribute 'encoding'
If anyone can help with this it would be very appreciated. Good luck!
Used get-pip.py , which I installed successfully via the Windows cmd prompt, yet couldn't get the import working in the IDLE. Here's the complete log -:
C:\Python33\Lib>get-pip.py install
Downloading/unpacking pip
Downloading pip-1.3.1.tar.gz (247Kb): 247Kb downloaded
Running setup.py egg_info for package pip
warning: no files found matching '*.html' under directory 'docs'
warning: no previously-included files matching '*.txt' found under directory
'docs\_build'
no previously-included directories found matching 'docs\_build\_sources'
Installing collected packages: pip
Found existing installation: pip 1.3.1
Uninstalling pip:
Successfully uninstalled pip
Running setup.py install for pip
warning: no files found matching '*.html' under directory 'docs'
warning: no previously-included files matching '*.txt' found under directory
'docs\_build'
no previously-included directories found matching 'docs\_build\_sources'
Installing pip-3.3-script.py script to C:\Python33\Scripts
Installing pip-3.3.exe script to C:\Python33\Scripts
Installing pip-script.py script to C:\Python33\Scripts
Installing pip.exe script to C:\Python33\Scripts
Successfully installed pip
Cleaning up...
C:\Python33\Lib>cd pip-1.3.1
C:\Python33\Lib\pip-1.3.1>cd pip-1.3.1
C:\Python33\Lib\pip-1.3.1\pip-1.3.1>pip install beautifulsoup4
'pip' is not recognized as an internal or external command,
operable program or batch file.
C:\Python33\Lib\pip-1.3.1\pip-1.3.1>cd ..
C:\Python33\Lib\pip-1.3.1>cd..
C:\Python33\Lib>pip install beautifulsoup4
'pip' is not recognized as an internal or external command,
operable program or batch file.
C:\Python33\Lib>python3-pip RPM
'python3-pip' is not recognized as an internal or external command,
operable program or batch file.
C:\Python33\Lib>cd pip-1.3.1
C:\Python33\Lib\pip-1.3.1>cd pip-1.3.1
C:\Python33\Lib\pip-1.3.1\pip-1.3.1>get-pip.py install
Downloading/unpacking pip
Downloading pip-1.3.1.tar.gz (247Kb): 247Kb downloaded
Running setup.py egg_info for package pip
warning: no files found matching '*.html' under directory 'docs'
warning: no previously-included files matching '*.txt' found under directory
'docs\_build'
no previously-included directories found matching 'docs\_build\_sources'
Installing collected packages: pip
Found existing installation: pip 1.3.1
Uninstalling pip:
Successfully uninstalled pip
Running setup.py install for pip
warning: no files found matching '*.html' under directory 'docs'
warning: no previously-included files matching '*.txt' found under directory
'docs\_build'
no previously-included directories found matching 'docs\_build\_sources'
Installing pip-3.3-script.py script to C:\Python33\Scripts
Installing pip-3.3.exe script to C:\Python33\Scripts
Installing pip-script.py script to C:\Python33\Scripts
Installing pip.exe script to C:\Python33\Scripts
Successfully installed pip
Cleaning up...
C:\Python33\Lib\pip-1.3.1\pip-1.3.1>sudo easy_install pandas
'sudo' is not recognized as an internal or external command,
operable program or batch file.
C:\Python33\Lib\pip-1.3.1\pip-1.3.1>setup.py install
running install
running bdist_egg
running egg_info
writing dependency_links to pip.egg-info\dependency_links.txt
writing top-level names to pip.egg-info\top_level.txt
writing pip.egg-info\PKG-INFO
writing requirements to pip.egg-info\requires.txt
writing entry points to pip.egg-info\entry_points.txt
reading manifest file 'pip.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.html' under directory 'docs'
warning: no previously-included files matching '*.txt' found under directory 'do
cs\_build'
no previously-included directories found matching 'docs\_build\_sources'
writing manifest file 'pip.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_py
creating build\bdist.win-amd64\egg
creating build\bdist.win-amd64\egg\pip
creating build\bdist.win-amd64\egg\pip\backwardcompat
copying build\lib\pip\backwardcompat\socket_create_connection.py -> build\bdist.
win-amd64\egg\pip\backwardcompat
copying build\lib\pip\backwardcompat\ssl_match_hostname.py -> build\bdist.win-am
d64\egg\pip\backwardcompat
copying build\lib\pip\backwardcompat\__init__.py -> build\bdist.win-amd64\egg\pi
p\backwardcompat
copying build\lib\pip\basecommand.py -> build\bdist.win-amd64\egg\pip
copying build\lib\pip\baseparser.py -> build\bdist.win-amd64\egg\pip
copying build\lib\pip\cacert.pem -> build\bdist.win-amd64\egg\pip
copying build\lib\pip\cmdoptions.py -> build\bdist.win-amd64\egg\pip
creating build\bdist.win-amd64\egg\pip\commands
copying build\lib\pip\commands\bundle.py -> build\bdist.win-amd64\egg\pip\comman
ds
copying build\lib\pip\commands\completion.py -> build\bdist.win-amd64\egg\pip\co
mmands
copying build\lib\pip\commands\freeze.py -> build\bdist.win-amd64\egg\pip\comman
ds
copying build\lib\pip\commands\help.py -> build\bdist.win-amd64\egg\pip\commands
copying build\lib\pip\commands\install.py -> build\bdist.win-amd64\egg\pip\comma
nds
copying build\lib\pip\commands\list.py -> build\bdist.win-amd64\egg\pip\commands
copying build\lib\pip\commands\search.py -> build\bdist.win-amd64\egg\pip\comman
ds
copying build\lib\pip\commands\show.py -> build\bdist.win-amd64\egg\pip\commands
copying build\lib\pip\commands\uninstall.py -> build\bdist.win-amd64\egg\pip\com
mands
copying build\lib\pip\commands\unzip.py -> build\bdist.win-amd64\egg\pip\command
s
copying build\lib\pip\commands\zip.py -> build\bdist.win-amd64\egg\pip\commands
copying build\lib\pip\commands\__init__.py -> build\bdist.win-amd64\egg\pip\comm
ands
copying build\lib\pip\download.py -> build\bdist.win-amd64\egg\pip
copying build\lib\pip\exceptions.py -> build\bdist.win-amd64\egg\pip
copying build\lib\pip\index.py -> build\bdist.win-amd64\egg\pip
copying build\lib\pip\locations.py -> build\bdist.win-amd64\egg\pip
copying build\lib\pip\log.py -> build\bdist.win-amd64\egg\pip
copying build\lib\pip\req.py -> build\bdist.win-amd64\egg\pip
copying build\lib\pip\runner.py -> build\bdist.win-amd64\egg\pip
copying build\lib\pip\status_codes.py -> build\bdist.win-amd64\egg\pip
copying build\lib\pip\util.py -> build\bdist.win-amd64\egg\pip
creating build\bdist.win-amd64\egg\pip\vcs
copying build\lib\pip\vcs\bazaar.py -> build\bdist.win-amd64\egg\pip\vcs
copying build\lib\pip\vcs\git.py -> build\bdist.win-amd64\egg\pip\vcs
copying build\lib\pip\vcs\mercurial.py -> build\bdist.win-amd64\egg\pip\vcs
copying build\lib\pip\vcs\subversion.py -> build\bdist.win-amd64\egg\pip\vcs
copying build\lib\pip\vcs\__init__.py -> build\bdist.win-amd64\egg\pip\vcs
copying build\lib\pip\__init__.py -> build\bdist.win-amd64\egg\pip
copying build\lib\pip\__main__.py -> build\bdist.win-amd64\egg\pip
byte-compiling build\bdist.win-amd64\egg\pip\backwardcompat\socket_create_connec
tion.py to socket_create_connection.cpython-33.pyc
byte-compiling build\bdist.win-amd64\egg\pip\backwardcompat\ssl_match_hostname.p
y to ssl_match_hostname.cpython-33.pyc
byte-compiling build\bdist.win-amd64\egg\pip\backwardcompat\__init__.py to __ini
t__.cpython-33.pyc
byte-compiling build\bdist.win-amd64\egg\pip\basecommand.py to basecommand.cpyth
on-33.pyc
byte-compiling build\bdist.win-amd64\egg\pip\baseparser.py to baseparser.cpython
-33.pyc
byte-compiling build\bdist.win-amd64\egg\pip\cmdoptions.py to cmdoptions.cpython
-33.pyc
byte-compiling build\bdist.win-amd64\egg\pip\commands\bundle.py to bundle.cpytho
n-33.pyc
byte-compiling build\bdist.win-amd64\egg\pip\commands\completion.py to completio
n.cpython-33.pyc
byte-compiling build\bdist.win-amd64\egg\pip\commands\freeze.py to freeze.cpytho
n-33.pyc
byte-compiling build\bdist.win-amd64\egg\pip\commands\help.py to help.cpython-33
.pyc
byte-compiling build\bdist.win-amd64\egg\pip\commands\install.py to install.cpyt
hon-33.pyc
byte-compiling build\bdist.win-amd64\egg\pip\commands\list.py to list.cpython-33
.pyc
byte-compiling build\bdist.win-amd64\egg\pip\commands\search.py to search.cpytho
n-33.pyc
byte-compiling build\bdist.win-amd64\egg\pip\commands\show.py to show.cpython-33
.pyc
byte-compiling build\bdist.win-amd64\egg\pip\commands\uninstall.py to uninstall.
cpython-33.pyc
byte-compiling build\bdist.win-amd64\egg\pip\commands\unzip.py to unzip.cpython-
33.pyc
byte-compiling build\bdist.win-amd64\egg\pip\commands\zip.py to zip.cpython-33.p
yc
byte-compiling build\bdist.win-amd64\egg\pip\commands\__init__.py to __init__.cp
ython-33.pyc
byte-compiling build\bdist.win-amd64\egg\pip\download.py to download.cpython-33.
pyc
byte-compiling build\bdist.win-amd64\egg\pip\exceptions.py to exceptions.cpython
-33.pyc
byte-compiling build\bdist.win-amd64\egg\pip\index.py to index.cpython-33.pyc
byte-compiling build\bdist.win-amd64\egg\pip\locations.py to locations.cpython-3
3.pyc
byte-compiling build\bdist.win-amd64\egg\pip\log.py to log.cpython-33.pyc
byte-compiling build\bdist.win-amd64\egg\pip\req.py to req.cpython-33.pyc
byte-compiling build\bdist.win-amd64\egg\pip\runner.py to runner.cpython-33.pyc
byte-compiling build\bdist.win-amd64\egg\pip\status_codes.py to status_codes.cpy
thon-33.pyc
byte-compiling build\bdist.win-amd64\egg\pip\util.py to util.cpython-33.pyc
byte-compiling build\bdist.win-amd64\egg\pip\vcs\bazaar.py to bazaar.cpython-33.
pyc
byte-compiling build\bdist.win-amd64\egg\pip\vcs\git.py to git.cpython-33.pyc
byte-compiling build\bdist.win-amd64\egg\pip\vcs\mercurial.py to mercurial.cpyth
on-33.pyc
byte-compiling build\bdist.win-amd64\egg\pip\vcs\subversion.py to subversion.cpy
thon-33.pyc
byte-compiling build\bdist.win-amd64\egg\pip\vcs\__init__.py to __init__.cpython
-33.pyc
byte-compiling build\bdist.win-amd64\egg\pip\__init__.py to __init__.cpython-33.
pyc
byte-compiling build\bdist.win-amd64\egg\pip\__main__.py to __main__.cpython-33.
pyc
creating build\bdist.win-amd64\egg\EGG-INFO
copying pip.egg-info\PKG-INFO -> build\bdist.win-amd64\egg\EGG-INFO
copying pip.egg-info\SOURCES.txt -> build\bdist.win-amd64\egg\EGG-INFO
copying pip.egg-info\dependency_links.txt -> build\bdist.win-amd64\egg\EGG-INFO
copying pip.egg-info\entry_points.txt -> build\bdist.win-amd64\egg\EGG-INFO
copying pip.egg-info\not-zip-safe -> build\bdist.win-amd64\egg\EGG-INFO
copying pip.egg-info\requires.txt -> build\bdist.win-amd64\egg\EGG-INFO
copying pip.egg-info\top_level.txt -> build\bdist.win-amd64\egg\EGG-INFO
creating 'dist\pip-1.3.1-py3.3.egg' and adding 'build\bdist.win-amd64\egg' to it
removing 'build\bdist.win-amd64\egg' (and everything under it)
Processing pip-1.3.1-py3.3.egg
creating c:\python33\lib\site-packages\pip-1.3.1-py3.3.egg
Extracting pip-1.3.1-py3.3.egg to c:\python33\lib\site-packages
Adding pip 1.3.1 to easy-install.pth file
Installing pip-3.3-script.py script to C:\Python33\Scripts
Installing pip-3.3.exe script to C:\Python33\Scripts
Installing pip-script.py script to C:\Python33\Scripts
Installing pip.exe script to C:\Python33\Scripts
Installed c:\python33\lib\site-packages\pip-1.3.1-py3.3.egg
Processing dependencies for pip==1.3.1
Finished processing dependencies for pip==1.3.1
import pip in IDLE [I am with Python 3.3.0]
>
import pip
Traceback (most recent call last):
File "<pyshell#5>", line 1, in <module>
import pip
File "C:\Python33\lib\site-packages\pip\__init__.py", line 9, in <module>
from pip.log import logger
File "C:\Python33\lib\site-packages\pip\log.py", line 7, in <module>
from pip import backwardcompat
File "C:\Python33\lib\site-packages\pip\backwardcompat\__init__.py", line 27, in <module>
console_encoding = sys.__stdout__.encoding
AttributeError: 'NoneType' object has no attribute 'encoding'
Related
I have run into a problem while installing pychopg2 into my work computer (windows btw). Using pip wasn't an option, due to network restrictions, so I have learned how to install packages manually, and after some attempts, it seems to be working and installation runs without error:
running install
running bdist_egg
running egg_info
writing psycopg2.egg-info\PKG-INFO
writing dependency_links to psycopg2.egg-info\dependency_links.txt
writing top-level names to psycopg2.egg-info\top_level.txt
reading manifest file 'psycopg2.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'psycopg2.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_py
running build_ext
creating build\bdist.win-amd64\egg
creating build\bdist.win-amd64\egg\psycopg2
copying build\lib.win-amd64-3.7\psycopg2\compat.py -> build\bdist.win-amd64\egg\psycopg2
copying build\lib.win-amd64-3.7\psycopg2\errorcodes.py -> build\bdist.win-amd64\egg\psycopg2
copying build\lib.win-amd64-3.7\psycopg2\errors.py -> build\bdist.win-amd64\egg\psycopg2
copying build\lib.win-amd64-3.7\psycopg2\extensions.py -> build\bdist.win-amd64\egg\psycopg2
copying build\lib.win-amd64-3.7\psycopg2\extras.py -> build\bdist.win-amd64\egg\psycopg2
copying build\lib.win-amd64-3.7\psycopg2\pool.py -> build\bdist.win-amd64\egg\psycopg2
copying build\lib.win-amd64-3.7\psycopg2\sql.py -> build\bdist.win-amd64\egg\psycopg2
copying build\lib.win-amd64-3.7\psycopg2\tz.py -> build\bdist.win-amd64\egg\psycopg2
copying build\lib.win-amd64-3.7\psycopg2\_ipaddress.py -> build\bdist.win-amd64\egg\psycopg2
copying build\lib.win-amd64-3.7\psycopg2\_json.py -> build\bdist.win-amd64\egg\psycopg2
copying build\lib.win-amd64-3.7\psycopg2\_lru_cache.py -> build\bdist.win-amd64\egg\psycopg2
copying build\lib.win-amd64-3.7\psycopg2\_psycopg.cp37-win_amd64.pyd -> build\bdist.win-amd64\egg\psycopg2
copying build\lib.win-amd64-3.7\psycopg2\_range.py -> build\bdist.win-amd64\egg\psycopg2
copying build\lib.win-amd64-3.7\psycopg2\__init__.py -> build\bdist.win-amd64\egg\psycopg2
byte-compiling build\bdist.win-amd64\egg\psycopg2\compat.py to compat.cpython-37.pyc
byte-compiling build\bdist.win-amd64\egg\psycopg2\errorcodes.py to errorcodes.cpython-37.pyc
byte-compiling build\bdist.win-amd64\egg\psycopg2\errors.py to errors.cpython-37.pyc
byte-compiling build\bdist.win-amd64\egg\psycopg2\extensions.py to extensions.cpython-37.pyc
byte-compiling build\bdist.win-amd64\egg\psycopg2\extras.py to extras.cpython-37.pyc
byte-compiling build\bdist.win-amd64\egg\psycopg2\pool.py to pool.cpython-37.pyc
byte-compiling build\bdist.win-amd64\egg\psycopg2\sql.py to sql.cpython-37.pyc
byte-compiling build\bdist.win-amd64\egg\psycopg2\tz.py to tz.cpython-37.pyc
byte-compiling build\bdist.win-amd64\egg\psycopg2\_ipaddress.py to _ipaddress.cpython-37.pyc
byte-compiling build\bdist.win-amd64\egg\psycopg2\_json.py to _json.cpython-37.pyc
byte-compiling build\bdist.win-amd64\egg\psycopg2\_lru_cache.py to _lru_cache.cpython-37.pyc
byte-compiling build\bdist.win-amd64\egg\psycopg2\_range.py to _range.cpython-37.pyc
byte-compiling build\bdist.win-amd64\egg\psycopg2\__init__.py to __init__.cpython-37.pyc
creating stub loader for psycopg2\_psycopg.cp37-win_amd64.pyd
byte-compiling build\bdist.win-amd64\egg\psycopg2\_psycopg.py to _psycopg.cpython-37.pyc
creating build\bdist.win-amd64\egg\EGG-INFO
copying psycopg2.egg-info\PKG-INFO -> build\bdist.win-amd64\egg\EGG-INFO
copying psycopg2.egg-info\SOURCES.txt -> build\bdist.win-amd64\egg\EGG-INFO
copying psycopg2.egg-info\dependency_links.txt -> build\bdist.win-amd64\egg\EGG-INFO
copying psycopg2.egg-info\top_level.txt -> build\bdist.win-amd64\egg\EGG-INFO
writing build\bdist.win-amd64\egg\EGG-INFO\native_libs.txt
zip_safe flag not set; analyzing archive contents...
psycopg2.__pycache__._psycopg.cpython-37: module references __file__
creating 'dist\psycopg2-2.8.4-py3.7-win-amd64.egg' and adding 'build\bdist.win-amd64\egg' to it
removing 'build\bdist.win-amd64\egg' (and everything under it)
Processing psycopg2-2.8.4-py3.7-win-amd64.egg
removing 'c:\users\user\anaconda\lib\site-packages\psycopg2-2.8.4-py3.7-win-amd64.egg' (and everything under it)
creating c:\users\user\anaconda\lib\site-packages\psycopg2-2.8.4-py3.7-win-amd64.egg
Extracting psycopg2-2.8.4-py3.7-win-amd64.egg to c:\users\user\anaconda\lib\site-packages
psycopg2 2.8.4 is already the active version in easy-install.pth
Installed c:\users\user\anaconda\lib\site-packages\psycopg2-2.8.4-py3.7-win-amd64.egg
Processing dependencies for psycopg2==2.8.4
Finished processing dependencies for psycopg2==2.8.4
But my code editor still complains about 'No module named psychopg2'. I am using anaconda3, added to path during installation. It seems that it could cause problems but I don't know if it is what is causing the package not to be recognized. Also, when I run python from cmd, it says:
Warning:
This Python interpreter is in a conda environment, but the environment has
not been activated. Libraries may fail to load. To activate this environment
please see https://conda.io/activation
But when I go to the folder where the environment is supposed to be, it is empty. So I tried to create one, and I get another network error. I'm getting out of ideas.
You are running the Anaconda interpreter without activating the environment.
Run conda activate env_name where env_name is the environment you created or base for the default environment. Then, install your package from within the environment using either conda (preferred) or pip and run Python while the environment is active.
I try to install lmfit package on my Windows 10 computer. Because I could not install the package by typing: pip install lmfitI typed: python setup.py install. Then it shows:
running install
running bdist_egg
running egg_info
writing lmfit.egg-info\PKG-INFO
writing dependency_links to lmfit.egg-info\dependency_links.txt
writing requirements to lmfit.egg-info\requires.txt
writing top-level names to lmfit.egg-info\top_level.txt
reading manifest file 'lmfit.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'README.txt'
warning: no previously-included files found matching '*.pyc'
warning: no previously-included files found matching 'core.*'
warning: no previously-included files found matching '*~'
warning: no previously-included files found matching '*.pdf'
warning: no files found matching '*.dat' under directory 'tests'
warning: no previously-included files matching '*' found under directory 'doc\_build'
warning: no previously-included files matching '*.pdf' found under directory 'doc'
writing manifest file 'lmfit.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_py
UPDATING build\lib\lmfit/_version.py
set build\lib\lmfit/_version.py to '0.9.12'
creating build\bdist.win-amd64\egg
creating build\bdist.win-amd64\egg\lmfit
copying build\lib\lmfit\confidence.py -> build\bdist.win-amd64\egg\lmfit
copying build\lib\lmfit\jsonutils.py -> build\bdist.win-amd64\egg\lmfit
copying build\lib\lmfit\lineshapes.py -> build\bdist.win-amd64\egg\lmfit
copying build\lib\lmfit\minimizer.py -> build\bdist.win-amd64\egg\lmfit
copying build\lib\lmfit\model.py -> build\bdist.win-amd64\egg\lmfit
copying build\lib\lmfit\models.py -> build\bdist.win-amd64\egg\lmfit
copying build\lib\lmfit\parameter.py -> build\bdist.win-amd64\egg\lmfit
copying build\lib\lmfit\printfuncs.py -> build\bdist.win-amd64\egg\lmfit
creating build\bdist.win-amd64\egg\lmfit\ui
copying build\lib\lmfit\ui\basefitter.py -> build\bdist.win-amd64\egg\lmfit\ui
copying build\lib\lmfit\ui\ipy_fitter.py -> build\bdist.win-amd64\egg\lmfit\ui
copying build\lib\lmfit\ui\__init__.py -> build\bdist.win-amd64\egg\lmfit\ui
copying build\lib\lmfit\_ampgo.py -> build\bdist.win-amd64\egg\lmfit
copying build\lib\lmfit\_version.py -> build\bdist.win-amd64\egg\lmfit
copying build\lib\lmfit\__init__.py -> build\bdist.win-amd64\egg\lmfit
byte-compiling build\bdist.win-amd64\egg\lmfit\confidence.py to confidence.cpython-37.pyc
byte-compiling build\bdist.win-amd64\egg\lmfit\jsonutils.py to jsonutils.cpython-37.pyc
byte-compiling build\bdist.win-amd64\egg\lmfit\lineshapes.py to lineshapes.cpython-37.pyc
byte-compiling build\bdist.win-amd64\egg\lmfit\minimizer.py to minimizer.cpython-37.pyc
byte-compiling build\bdist.win-amd64\egg\lmfit\model.py to model.cpython-37.pyc
byte-compiling build\bdist.win-amd64\egg\lmfit\models.py to models.cpython-37.pyc
byte-compiling build\bdist.win-amd64\egg\lmfit\parameter.py to parameter.cpython-37.pyc
byte-compiling build\bdist.win-amd64\egg\lmfit\printfuncs.py to printfuncs.cpython-37.pyc
byte-compiling build\bdist.win-amd64\egg\lmfit\ui\basefitter.py to basefitter.cpython-37.pyc
byte-compiling build\bdist.win-amd64\egg\lmfit\ui\ipy_fitter.py to ipy_fitter.cpython-37.pyc
byte-compiling build\bdist.win-amd64\egg\lmfit\ui\__init__.py to __init__.cpython-37.pyc
byte-compiling build\bdist.win-amd64\egg\lmfit\_ampgo.py to _ampgo.cpython-37.pyc
byte-compiling build\bdist.win-amd64\egg\lmfit\_version.py to _version.cpython-37.pyc
byte-compiling build\bdist.win-amd64\egg\lmfit\__init__.py to __init__.cpython-37.pyc
creating build\bdist.win-amd64\egg\EGG-INFO
copying lmfit.egg-info\PKG-INFO -> build\bdist.win-amd64\egg\EGG-INFO
copying lmfit.egg-info\SOURCES.txt -> build\bdist.win-amd64\egg\EGG-INFO
copying lmfit.egg-info\dependency_links.txt -> build\bdist.win-amd64\egg\EGG-INFO
copying lmfit.egg-info\requires.txt -> build\bdist.win-amd64\egg\EGG-INFO
copying lmfit.egg-info\top_level.txt -> build\bdist.win-amd64\egg\EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating 'dist\lmfit-0.9.12-py3.7.egg' and adding 'build\bdist.win-amd64\egg' to it
removing 'build\bdist.win-amd64\egg' (and everything under it)
Processing lmfit-0.9.12-py3.7.egg
Removing c:\users\re090\anaconda3\lib\site-packages\lmfit-0.9.12-py3.7.egg
Copying lmfit-0.9.12-py3.7.egg to c:\users\re090\anaconda3\lib\site-packages
lmfit 0.9.12 is already the active version in easy-install.pth
Installed c:\users\re090\anaconda3\lib\site-packages\lmfit-0.9.12-py3.7.egg
Processing dependencies for lmfit==0.9.12
Searching for uncertainties>=3.0
Reading https://pypi.org/simple/uncertainties/
Download error on https://pypi.org/simple/uncertainties/: unknown url type: https -- Some packages may not be found!
Couldn't find index page for 'uncertainties' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.org/simple/
Download error on https://pypi.org/simple/: unknown url type: https -- Some packages may not be found!
No local packages or working download links found for uncertainties>=3.0
error: Could not find suitable distribution for Requirement.parse('uncertainties>=3.0')
This package actually runs well in other Windows 10 computer. But I got this error message on another newer Windows 10 computer. I'm wondering if it is the system's problem, which cannot be easily solved.
Do anybody know how to fix it?
Hm, not sure what the problem is -- it should work. The uncertainties dependency is spelled correctly and is available on PyPI. It is also available on conda channels conda-forge and gsecars. That is, either
pip install uncertainties
or
conda install -c gsecars uncertainties
or
conda install -c conda-forge uncertainties
should work.
But, to be clear pip install lmfit should also have worked. Any idea why that did not work?
While installing xgboost from git (followed by "python setup.py install"), I get the console messages as shown below:-
=========
(C:\Users\MUSTHAFA-PC\Anaconda3) C:\Users\MUSTHAFA-PC\xgboost_install_dir\python-package>python setup.py install
Install libxgboost from: ['xgboost\\xgboost.dll']
running install
running bdist_egg
running egg_info
writing xgboost.egg-info\PKG-INFO
writing requirements to xgboost.egg-info\requires.txt
writing dependency_links to xgboost.egg-info\dependency_links.txt
writing top-level names to xgboost.egg-info\top_level.txt
reading manifest file 'xgboost.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
*warning: no files found matching '*' under directory 'xgboost\include'
warning: no files found matching '*' under directory 'xgboost\src'
warning: no files found matching '*' under directory 'xgboost\make'
warning: no files found matching '*' under directory 'xgboost\rabit'
warning: no files found matching '*' under directory 'xgboost\lib'
warning: no files found matching '*' under directory 'xgboost\dmlc-core'
warning: no previously-included files matching '*.o' found anywhere in distribution
warning: no previously-included files matching '*.a' found anywhere in distribution
warning: no previously-included files matching '*.pyo' found anywhere in distribution
warning: no previously-included files matching '*.pyc' found anywhere in distribution*
writing manifest file 'xgboost.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_py
creating build\bdist.win-amd64\egg
creating build\bdist.win-amd64\egg\xgboost
copying build\lib\xgboost\build-python.sh -> build\bdist.win-amd64\egg\xgboost
copying build\lib\xgboost\callback.py -> build\bdist.win-amd64\egg\xgboost
copying build\lib\xgboost\compat.py -> build\bdist.win-amd64\egg\xgboost
copying build\lib\xgboost\core.py -> build\bdist.win-amd64\egg\xgboost
copying build\lib\xgboost\libpath.py -> build\bdist.win-amd64\egg\xgboost
copying build\lib\xgboost\plotting.py -> build\bdist.win-amd64\egg\xgboost
copying build\lib\xgboost\rabit.py -> build\bdist.win-amd64\egg\xgboost
copying build\lib\xgboost\sklearn.py -> build\bdist.win-amd64\egg\xgboost
copying build\lib\xgboost\training.py -> build\bdist.win-amd64\egg\xgboost
copying build\lib\xgboost\VERSION -> build\bdist.win-amd64\egg\xgboost
copying build\lib\xgboost\xgboost.dll -> build\bdist.win-amd64\egg\xgboost
copying build\lib\xgboost\__init__.py -> build\bdist.win-amd64\egg\xgboost
byte-compiling build\bdist.win-amd64\egg\xgboost\callback.py to callback.cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\xgboost\compat.py to compat.cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\xgboost\core.py to core.cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\xgboost\libpath.py to libpath.cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\xgboost\plotting.py to plotting.cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\xgboost\rabit.py to rabit.cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\xgboost\sklearn.py to sklearn.cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\xgboost\training.py to training.cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\xgboost\__init__.py to __init__.cpython-35.pyc
installing package data to build\bdist.win-amd64\egg
running install_data
creating build\bdist.win-amd64\egg\EGG-INFO
copying xgboost.egg-info\PKG-INFO -> build\bdist.win-amd64\egg\EGG-INFO
copying xgboost.egg-info\SOURCES.txt -> build\bdist.win-amd64\egg\EGG-INFO
copying xgboost.egg-info\dependency_links.txt -> build\bdist.win-amd64\egg\EGG-INFO
copying xgboost.egg-info\not-zip-safe -> build\bdist.win-amd64\egg\EGG-INFO
copying xgboost.egg-info\requires.txt -> build\bdist.win-amd64\egg\EGG-INFO
copying xgboost.egg-info\top_level.txt -> build\bdist.win-amd64\egg\EGG-INFO
writing build\bdist.win-amd64\egg\EGG-INFO\native_libs.txt
creating 'dist\xgboost-0.6-py3.5.egg' and adding 'build\bdist.win-amd64\egg' to it
removing 'build\bdist.win-amd64\egg' (and everything under it)
Processing xgboost-0.6-py3.5.egg
removing 'c:\users\musthafa-pc\anaconda3\lib\site-packages\xgboost-0.6-py3.5.egg' (and everything under it)
creating c:\users\musthafa-pc\anaconda3\lib\site-packages\xgboost-0.6-py3.5.egg
Extracting xgboost-0.6-py3.5.egg to c:\users\musthafa-pc\anaconda3\lib\site-packages
xgboost 0.6 is already the active version in easy-install.pth
Installed c:\users\musthafa-pc\anaconda3\lib\site-packages\xgboost-0.6-py3.5.egg
Processing dependencies for xgboost==0.6
Searching for scipy==0.19.1
Best match: scipy 0.19.1
Adding scipy 0.19.1 to easy-install.pth file
Using c:\users\musthafa-pc\anaconda3\lib\site-packages
Searching for numpy==1.13.1
Best match: numpy 1.13.1
Adding numpy 1.13.1 to easy-install.pth file
Using c:\users\musthafa-pc\anaconda3\lib\site-packages
Finished processing dependencies for xgboost==0.6
(C:\Users\MUSTHAFA-PC\Anaconda3) C:\Users\MUSTHAFA-PC\xgboost_install_dir\python-package>
==========
I am not aware of the criticality of those warning messages, but the process seems to have finished without error.
But when I try to import xgboost in jupyter notebook ("import xgboost"), error occurs with following trace messages:-
OSError Traceback (most recent call last)
<ipython-input-1-e81c313a2b5e> in <module>()
4 import numpy as np
5 import matplotlib.pyplot as plt
----> 6 import xgboost
C:\Users\MUSTHAFA-PC\Anaconda3\lib\site-packages\xgboost-0.6-py3.5.egg\xgboost\__init__.py in <module>()
9 import os
10
---> 11 from .core import DMatrix, Booster
12 from .training import train, cv
13 from . import rabit # noqa
C:\Users\MUSTHAFA-PC\Anaconda3\lib\site-packages\xgboost-0.6-py3.5.egg\xgboost\core.py in <module>()
113
114 # load the XGBoost library globally
--> 115 _LIB = _load_lib()
116
117
C:\Users\MUSTHAFA-PC\Anaconda3\lib\site-packages\xgboost-0.6-py3.5.egg\xgboost\core.py in _load_lib()
107 if len(lib_path) == 0:
108 return None
--> 109 lib = ctypes.cdll.LoadLibrary(lib_path[0])
110 lib.XGBGetLastError.restype = ctypes.c_char_p
111 return lib
C:\Users\MUSTHAFA-PC\Anaconda3\lib\ctypes\__init__.py in LoadLibrary(self, name)
427
428 def LoadLibrary(self, name):
--> 429 return self._dlltype(name)
430
431 cdll = LibraryLoader(CDLL)
C:\Users\MUSTHAFA-PC\Anaconda3\lib\ctypes\__init__.py in __init__(self, name, mode, handle, use_errno, use_last_error)
349
350 if handle is None:
--> 351 self._handle = _dlopen(self._name, mode)
352 else:
353 self._handle = handle
OSError: [WinError 126] The specified module could not be found
Apparently it is not able to import DMatrix, Booster as "the specified module could not be found".
Any idea how to rectify this?
My python version is 3.5 while xgboost is 0.6
Berfore you import xgboost, you need to add the path to the g++ runtime libraries to the os environment path variable. The following code works:
import os
mingw_path = 'C:\\Program Files\\mingw-w64\\x86_64-7.2.0-posix-seh-rt_v5-rev0\\mingw64\\bin'
os.environ['PATH'] = mingw_path + ';' + os.environ['PATH']
You can replace the path with your own directory.
I've encountered the same problem because for some reason lib folder inside of my Anaconda installation had the first letter uppercase Lib and this was causing the issue. All I had to do was to change folder name to lib:
C:\Anaconda3\Lib\site-packages\xgboost-0.6-py3.5.egg...
to
C:\Anaconda3\lib\site-packages\xgboost-0.6-py3.5.egg...
this change didn't break anything and fixed module could not be found error.
I'm trying to install from source psutil 2.1.0 for Python 3.4. My OS is Windows 7 x64. I receive the error:
c:\Python34\psutil-2.1.0>python setup.py install --verbose
running install
running bdist_egg
running egg_info
writing top-level names to psutil.egg-info\top_level.txt
writing psutil.egg-info\PKG-INFO
writing dependency_links to psutil.egg-info\dependency_links.txt
reading manifest file 'psutil.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*' found under directory 'docs
build'
writing manifest file 'psutil.egg-info\SOURCES.txt'
installing library code to build\bdist.win32\egg
running install_lib
running build_py
creating build
creating build\lib.win32-3.4
creating build\lib.win32-3.4\psutil
copying psutil\_common.py -> build\lib.win32-3.4\psutil
copying psutil\_compat.py -> build\lib.win32-3.4\psutil
copying psutil\_psbsd.py -> build\lib.win32-3.4\psutil
copying psutil\_pslinux.py -> build\lib.win32-3.4\psutil
copying psutil\_psosx.py -> build\lib.win32-3.4\psutil
copying psutil\_psposix.py -> build\lib.win32-3.4\psutil
copying psutil\_pssunos.py -> build\lib.win32-3.4\psutil
copying psutil\_pswindows.py -> build\lib.win32-3.4\psutil
copying psutil\__init__.py -> build\lib.win32-3.4\psutil
running build_ext
building '_psutil_windows' extension
error: Unable to find vcvarsall.bat
Can you help me please? Thanks in advance
vcvarsall.bat looks like a dependency for Microsoft Visual Studio.
See: Python issue:Unable to find vcvarsall.bat
You could try to install it manually. Get the amd64 py3.4 build from here:
http://www.lfd.uci.edu/~gohlke/pythonlibs/#psutil
And install it. If that fails as well, use 7-Zip to open the .exe and unpack the contained folder to your site-packages.
try my experience. I hope it will be helpful
I have Ptython 3.4 installed. I was trying to install 'paramiko' modul and I've recieved an error message (vcvarsall.bat)
So after that I did folowing:
1. install MinGW (refer to page- http://docs.cython.org/src/tutorial/appendix.html)
2. install pycrypto2.6.1 (I've found it here - https://github.com/axper/python3-pycrypto-windows-installer) for others python version please refer this page -- www.voidspace.org.uk/python/modules.shtml#pycrypto
3. check
I've just installed the latest python twitter build ( https://github.com/bear/python-twitter ) and I'm receiving the below error. I get it when I try to use "twitter" from the shell...the "pip install python-twitter" worked fine, except it uses outdated api. This one seemed it might be updated, but throws the below error.
Error:
Traceback (most recent call last):
File "/usr/local/bin/twitter", line 9, in <module>
load_entry_point('twitter==1.12.1', 'console_scripts', 'twitter')()
File "/usr/local/lib/python2.7/dist-packages/pkg_resources.py", line 353, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/local/lib/python2.7/dist-packages/pkg_resources.py", line 2302, in load_entry_point
return ep.load()
File "/usr/local/lib/python2.7/dist-packages/pkg_resources.py", line 2029, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
ImportError: No module named cmdline
I'm having a hard time drilling down to what is causing this. Any thoughts?
In response to comments, I'm posting the output for each step, to see why the error remains:
1
pip uninstall twitter
response:
leo#production:~$ sudo pip uninstall twitter
Uninstalling twitter:
/usr/local/lib/python2.7/dist-packages/twitter-1.12.1-py2.7.egg
Proceed (y/n)? y
Successfully uninstalled twitter
2
sudo rm -rf /usr/lib/python2.7/site-packages/twitter-1.10.2-py2.7.egg
(silent)
3
wget https://pypi.python.org/packages/source/t/twitter/twitter-1.12.1.tar.gz
tar -xzf twitter*.tar.gz
cd twitter*
(successful)
3
sudo python setup.py build; sudo python setup.py install
Response:
p.py install
running build
running build_py
running egg_info
writing twitter.egg-info/PKG-INFO
writing top-level names to twitter.egg-info/top_level.txt
writing dependency_links to twitter.egg-info/dependency_links.txt
writing entry points to twitter.egg-info/entry_points.txt
reading manifest file 'twitter.egg-info/SOURCES.txt'
writing manifest file 'twitter.egg-info/SOURCES.txt'
running install
running bdist_egg
running egg_info
writing twitter.egg-info/PKG-INFO
writing top-level names to twitter.egg-info/top_level.txt
writing dependency_links to twitter.egg-info/dependency_links.txt
writing entry points to twitter.egg-info/entry_points.txt
reading manifest file 'twitter.egg-info/SOURCES.txt'
writing manifest file 'twitter.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/twitter
copying build/lib.linux-x86_64-2.7/twitter/follow.py -> build/bdist.linux-x86_64/egg/twitter
copying build/lib.linux-x86_64-2.7/twitter/api.py -> build/bdist.linux-x86_64/egg/twitter
copying build/lib.linux-x86_64-2.7/twitter/twitter_globals.py -> build/bdist.linux-x86_64/egg/twitter
copying build/lib.linux-x86_64-2.7/twitter/ansi.py -> build/bdist.linux-x86_64/egg/twitter
copying build/lib.linux-x86_64-2.7/twitter/stream.py -> build/bdist.linux-x86_64/egg/twitter
copying build/lib.linux-x86_64-2.7/twitter/ircbot.py -> build/bdist.linux-x86_64/egg/twitter
copying build/lib.linux-x86_64-2.7/twitter/timezones.py -> build/bdist.linux-x86_64/egg/twitter
copying build/lib.linux-x86_64-2.7/twitter/auth.py -> build/bdist.linux-x86_64/egg/twitter
copying build/lib.linux-x86_64-2.7/twitter/archiver.py -> build/bdist.linux-x86_64/egg/twitter
copying build/lib.linux-x86_64-2.7/twitter/stream_example.py -> build/bdist.linux-x86_64/egg/twitter
copying build/lib.linux-x86_64-2.7/twitter/cmdline.py -> build/bdist.linux-x86_64/egg/twitter
copying build/lib.linux-x86_64-2.7/twitter/util.py -> build/bdist.linux-x86_64/egg/twitter
copying build/lib.linux-x86_64-2.7/twitter/logger.py -> build/bdist.linux-x86_64/egg/twitter
copying build/lib.linux-x86_64-2.7/twitter/oauth2.py -> build/bdist.linux-x86_64/egg/twitter
copying build/lib.linux-x86_64-2.7/twitter/oauth.py -> build/bdist.linux-x86_64/egg/twitter
copying build/lib.linux-x86_64-2.7/twitter/__init__.py -> build/bdist.linux-x86_64/egg/twitter
copying build/lib.linux-x86_64-2.7/twitter/oauth_dance.py -> build/bdist.linux-x86_64/egg/twitter
byte-compiling build/bdist.linux-x86_64/egg/twitter/follow.py to follow.pyc
byte-compiling build/bdist.linux-x86_64/egg/twitter/api.py to api.pyc
byte-compiling build/bdist.linux-x86_64/egg/twitter/twitter_globals.py to twitter_globals.pyc
byte-compiling build/bdist.linux-x86_64/egg/twitter/ansi.py to ansi.pyc
byte-compiling build/bdist.linux-x86_64/egg/twitter/stream.py to stream.pyc
byte-compiling build/bdist.linux-x86_64/egg/twitter/ircbot.py to ircbot.pyc
byte-compiling build/bdist.linux-x86_64/egg/twitter/timezones.py to timezones.pyc
byte-compiling build/bdist.linux-x86_64/egg/twitter/auth.py to auth.pyc
byte-compiling build/bdist.linux-x86_64/egg/twitter/archiver.py to archiver.pyc
byte-compiling build/bdist.linux-x86_64/egg/twitter/stream_example.py to stream_example.pyc
byte-compiling build/bdist.linux-x86_64/egg/twitter/cmdline.py to cmdline.pyc
byte-compiling build/bdist.linux-x86_64/egg/twitter/util.py to util.pyc
byte-compiling build/bdist.linux-x86_64/egg/twitter/logger.py to logger.pyc
byte-compiling build/bdist.linux-x86_64/egg/twitter/oauth2.py to oauth2.pyc
byte-compiling build/bdist.linux-x86_64/egg/twitter/oauth.py to oauth.pyc
byte-compiling build/bdist.linux-x86_64/egg/twitter/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-x86_64/egg/twitter/oauth_dance.py to oauth_dance.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying twitter.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying twitter.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying twitter.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying twitter.egg-info/entry_points.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying twitter.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying twitter.egg-info/zip-safe -> build/bdist.linux-x86_64/egg/EGG-INFO
creating 'dist/twitter-1.12.1-py2.7.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing twitter-1.12.1-py2.7.egg
Copying twitter-1.12.1-py2.7.egg to /usr/local/lib/python2.7/dist-packages
Adding twitter 1.12.1 to easy-install.pth file
Installing twitter-log script to /usr/local/bin
Installing twitter script to /usr/local/bin
Installing twitterbot script to /usr/local/bin
Installing twitter-follow script to /usr/local/bin
Installing twitter-stream-example script to /usr/local/bin
Installing twitter-archiver script to /usr/local/bin
Installed /usr/local/lib/python2.7/dist-packages/twitter-1.12.1-py2.7.egg
Processing dependencies for twitter==1.12.1
Finished processing dependencies for twitter==1.12.1
I got this error a while back. What I did is completely remove Python Twitter Tools with:
pip uninstall twitter
sudo rm -rf /usr/lib/python2.7/site-packages/twitter-1.10.2-py2.7.egg
Then I reinstalled it by using:
wget https://pypi.python.org/packages/source/t/twitter/twitter-1.12.1.tar.gz
tar -xzf twitter*.tar.gz
cd twitter*
sudo python setup.py build; sudo python setup.py install
Now it should work.
Found it! Thanks to #RydallCooper I was put on the proper trail :D
I had two packages apparently...
I had to uninstall them both:
pip uninstall twitter
and then:
pip uninstall python-twitter
Now the error is gone :D
(A few years on!) the solution may be to check the versions
E.g. if you're using a Python 3 shell, you may need to use pip3 install twitter rather than just pip install twitter