Python Forum

Full Version: Troubles with numpy
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
With the window searcher(Type here to search) I can have python 3.6, but not 3.5
all weird things !
With the file manager I see Python35(at C:). Not Python36. I guess all my troubles come from that. I don't know how to replace Python35 by Python36.
in interactive window, type: python -V
This will show your version
Python 3.5.4. There are months I worked with python 3.6.4. If I desire I can have a console with 3.6.4. I don'nt know how 3.5.4 came up. With the window searcher I find 3.6 but not 3.5. Many weirds ! Thanks for your help.
sylas Wrote:I am sure python 3.6 is installed. Why pip speaks of python 3.5 instead of 3.6 ??
Did you mark of Add python 3.6 to Path under install?
[Image: 4Qfi5o.jpg]
If 3.5 still in path,you will need to change Environment Variables Path
[Image: lwkZgx.jpg]

sylas Wrote:With the file manager I see Python35(at C:). Not Python36. I guess all my troubles come from that. I don't know how to replace Python35 by Python36.
Did you follow tutorial and also changed path of python 3.6?
snippsat Wrote:Here also choose Path C:\Python36
If you not change path under install it will be in path far away:
C:\Users\<username>\AppData\Local\Programs\Python\Python36

Not to be rude but you have to read what i post several times,
because in many of your post you really struggle with the most basic stuff.
Maybe easier for you to uninstall 3.5 and 3.6,then follow step exactly as i post in tutorial.
I uninstalled 3.5 and 3.6. I installed python 3.4.5; As for numpy , always python cannot find numpy. May I know if your numpy is located at C:\python35\lib\site-packages ?

Error:
λ python Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 17:00:18) [MSC v.1900 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import numpy Traceback (most recent call last): File "<stdin>", line 1, in <module> ModuleNotFoundError: No module named 'numpy'
(Jun-09-2018, 04:36 PM)sylas Wrote: [ -> ]I uninstalled 3.5 and 3.6. I installed python 3.4.5
yet first line of traceback says
Error:
Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 17:00:18) [MSC v.1900 64 bit (AMD64)] on win32
python point correct to 3.6.5.
Do this to check to check path and pip.
# Check where python is installed
C:\
λ python -c "import sys; print(sys.executable)"
C:\python36\python.exe

# Check version
C:\
λ python -V
Python 3.6.5

# Check pip
C:\
λ pip -V
pip 10.0.1 from c:\python36\lib\site-packages\pip (python 3.6)
If It look like this all is correct and what you should have if follow tutorial.

Now can you install numpy:
λ pip install numpy
Collecting numpy
  Downloading https://files.pythonhosted.org/packages/6c/49/2bcf9d0484b33a6d7c5312121344a190d4a3d5f7826fcb3480cb62109073/numpy-1.14.4-cp36-none-win32.whl (9.8MB)
    100% |████████████████████████████████| 9.8MB 125kB/s
Installing collected packages: numpy
Successfully installed numpy-1.14.4
Now is numpy installed to 3.6,and all you install with pip will be installed to 3.6
You are right buran. Now my pip -V gives:pip 9.0.3 from c:\program files\python36\lib\site-packages (python 3.6)
But after deleting old numpy I tried "pip install numpy", without success

Error:
λ pip install numpy Collecting numpy Using cached https://files.pythonhosted.org/packages/21/06/a11c4b2e4f90c4f53c39b548a3f16eb644729048cf705 71a7672d87338/numpy-1.14.4-cp36-none-win_amd64.whl Installing collected packages: numpy Exception: Traceback (most recent call last): File "c:\program files\python36\lib\site-packages\pip\basecommand.py", line 215, in main status = self.run(options, args) File "c:\program files\python36\lib\site-packages\pip\commands\install.py", line 342, in run prefix=options.prefix_path, File "c:\program files\python36\lib\site-packages\pip\req\req_set.py", line 784, in install **kwargs File "c:\program files\python36\lib\site-packages\pip\req\req_install.py", line 851, in install self.move_wheel_files(self.source_dir, root=root, prefix=prefix) File "c:\program files\python36\lib\site-packages\pip\req\req_install.py", line 1064, in move_wheel_file isolated=self.isolated, File "c:\program files\python36\lib\site-packages\pip\wheel.py", line 345, in move_wheel_files clobber(source, lib_dir, True) File "c:\program files\python36\lib\site-packages\pip\wheel.py", line 316, in clobber ensure_dir(destdir) File "c:\program files\python36\lib\site-packages\pip\utils\__init__.py", line 83, in ensure_dir os.makedirs(path) File "c:\program files\python36\lib\os.py", line 220, in makedirs mkdir(name, mode) PermissionError: [WinError 5] Access is denied: 'c:\\program files\\python36\\Lib\\site-packages\\numpy' You are using pip version 9.0.3, however version 10.0.1 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command.
You need to run cmd or same with cmder as Administrator
Upgrade pip:
C:\
λ python -m pip install --upgrade pip
Then as Administrator same install of numpy as you have.
Pages: 1 2 3