Unable to install pip of Python 3.7.4 on Windows 10 - python

I had installed Python 3.7.4, and it doesn't install pip.
Install Python with IDLE and obviously with pip. But when I want to install pip, it shows this error.
Traceback (most recent call last):
File "get-pip.py", line 22312, in <module>
main()
File "get-pip.py", line 197, in main
bootstrap(tmpdir=tmpdir)
File "get-pip.py", line 82, in bootstrap
import pip._internal
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
File "C:\Users\Hp\AppData\Local\Temp\tmp7m70r5qb\pip.zip\pip\_internal\__init__.py", line 40, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
File "C:\Users\Hp\AppData\Local\Temp\tmp7m70r5qb\pip.zip\pip\_internal\cli\autocompletion.py", line 8, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
File "C:\Users\Hp\AppData\Local\Temp\tmp7m70r5qb\pip.zip\pip\_internal\cli\main_parser.py", line 11, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
File "C:\Users\Hp\AppData\Local\Temp\tmp7m70r5qb\pip.zip\pip\_internal\commands\__init__.py", line 6, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
File "C:\Users\Hp\AppData\Local\Temp\tmp7m70r5qb\pip.zip\pip\_internal\commands\completion.py", line 6, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
File "C:\Users\Hp\AppData\Local\Temp\tmp7m70r5qb\pip.zip\pip\_internal\cli\base_command.py", line 21, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
File "C:\Users\Hp\AppData\Local\Temp\tmp7m70r5qb\pip.zip\pip\_internal\download.py", line 14, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
File "C:\Users\Hp\AppData\Local\Temp\tmp7m70r5qb\pip.zip\pip\_vendor\requests\__init__.py", line 114, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
File "C:\Users\Hp\AppData\Local\Temp\tmp7m70r5qb\pip.zip\pip\_vendor\requests\utils.py", line 26, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
File "C:\Users\Hp\AppData\Local\Temp\tmp7m70r5qb\pip.zip\pip\_vendor\requests\_internal_utils.py", line 11, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
File "C:\Users\Hp\AppData\Local\Temp\tmp7m70r5qb\pip.zip\pip\_vendor\requests\compat.py", line 64, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 724, in exec_module
File "<frozen importlib._bootstrap_external>", line 859, in get_code
File "<frozen importlib._bootstrap_external>", line 917, in get_data
OSError: [Errno 9] Bad file descriptor
I am stuck and spent lots of hours. Any help will be appreciated.

Related

pyinstaller with tensorflow 1.15 compatability issue? Getting ValueError in compiled app

I'm trying to compile my code that used tensorflow. I've been working with Tensorflow 1.15 although it is compatible with (1.14 and 1.13). Previously had never had issues with pyinstaller but after creating a new conda environment I stopped being able to compile the same code.
To me, it seems like tensorflow and pyinstaller don't play with each other well. I tried a few version combinations and still no luck. I get this error during import tensorlfow statement after compilation. The program runs fine in python 3.7 or python 3.6.
Traceback (most recent call last):
File "my_dir\mv_app.py", line 39, in <module>
from shot_change_detection import shot_change_detection
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "PyInstaller\loader\pyimod03_importers.py", line 623, in exec_module
File "shot_change_detection\shot_change_detection.py", line 42, in <module>
import tensorflow as tf
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "PyInstaller\loader\pyimod03_importers.py", line 623, in exec_module
File "tensorflow\__init__.py", line 99, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "PyInstaller\loader\pyimod03_importers.py", line 623, in exec_module
File "tensorflow_core\__init__.py", line 28, in <module>
File "<frozen importlib._bootstrap>", line 1019, in _handle_fromlist
File "tensorflow\__init__.py", line 50, in __getattr__
File "tensorflow\__init__.py", line 44, in _load
File "importlib\__init__.py", line 127, in import_module
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "PyInstaller\loader\pyimod03_importers.py", line 623, in exec_module
File "tensorflow_core\python\__init__.py", line 52, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "PyInstaller\loader\pyimod03_importers.py", line 623, in exec_module
File "tensorflow_core\core\framework\graph_pb2.py", line 7, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "PyInstaller\loader\pyimod03_importers.py", line 623, in exec_module
ValueError: source code string cannot contain null bytes

pyinstaller FileNotFoundError

This Is Error Which I Got in Cmd i Used pyrogram which is telegram client library
Traceback (most recent call last):
File "pyroses.py", line 1, in <module>
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "c:\python38\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 623, in exec_module
exec(bytecode, module.__dict__)
File "site-packages\pyrogram\client\client.py", line 39, in <module>
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "c:\python38\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 623, in exec_module
exec(bytecode, module.__dict__)
File "site-packages\pyrogram\client\methods\__init__.py", line 19, in <module>
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "c:\python38\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 623, in exec_module
exec(bytecode, module.__dict__)
File "site-packages\pyrogram\client\methods\bots\__init__.py", line 19, in <module>
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "c:\python38\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 623, in exec_module
exec(bytecode, module.__dict__)
File "site-packages\pyrogram\client\ext\__init__.py", line 19, in <module>
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
File "c:\python38\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 623, in exec_module
exec(bytecode, module.__dict__)
File "site-packages\pyrogram\client\ext\base_client.py", line 32, in <module>
File "site-packages\pyrogram\client\ext\base_client.py", line 80, in BaseClient
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\DarkWeb\\AppData\\Local\\Temp\\_MEI113122\\pyrogram\\client\\ext/mime.types'
[14764] Failed to execute script pyroses
just i used pyrogram library and used client.get_me()
my code
import pyrogram
client = pyrogram.Client(
session_name,
api_id=****,
api_hash="****"
).start()
print(client.get())
i converted it into exe using pyinstaller -F -i icon.ico pyroses.py and it showed me this

PyInstaller error when running exe with TensorFlow2 and Tkinter libraries

I have a small application on Tkinter that uses the TensorFlow2 library. I'm running pyinstaller main2.py and the project is successfully built, but when you run it through the console, you get this:
C:\Users\pikro\PycharmProjects\NeuralStyleTransfer\dist\main2>main2.exe
2020-05-24 15:48:27.175935: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cudart64_101.dll'; dlerror: cudart64_101.dll not found
2020-05-24 15:48:27.180194: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
c:\users\pikro\anaconda3\lib\site-packages\PyInstaller\loader\pyimod03_importers.py:489: MatplotlibDeprecationWarning:
The MATPLOTLIBDATA environment variable was deprecated in Matplotlib 3.1 and will be removed in 3.3.
exec(bytecode, module.__dict__)
Traceback (most recent call last):
File "main2.py", line 2, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "c:\users\pikro\anaconda3\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 489, in exec_module
exec(bytecode, module.__dict__)
File "site-packages\tensorflow\__init__.py", line 48, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "c:\users\pikro\anaconda3\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 489, in exec_module
exec(bytecode, module.__dict__)
File "site-packages\tensorflow\_api\v2\compat\__init__.py", line 39, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "c:\users\pikro\anaconda3\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 489, in exec_module
exec(bytecode, module.__dict__)
File "site-packages\tensorflow\_api\v2\compat\v1\__init__.py", line 34, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "c:\users\pikro\anaconda3\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 489, in exec_module
exec(bytecode, module.__dict__)
File "site-packages\tensorflow\_api\v2\compat\v1\compat\__init__.py", line 39, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "c:\users\pikro\anaconda3\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 489, in exec_module
exec(bytecode, module.__dict__)
File "site-packages\tensorflow\_api\v2\compat\v1\compat\v1\__init__.py", line 51, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "c:\users\pikro\anaconda3\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 489, in exec_module
exec(bytecode, module.__dict__)
File "site-packages\tensorflow\_api\v2\compat\v1\lite\__init__.py", line 11, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "c:\users\pikro\anaconda3\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 489, in exec_module
exec(bytecode, module.__dict__)
File "site-packages\tensorflow\_api\v2\compat\v1\lite\experimental\__init__.py", line 10, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "c:\users\pikro\anaconda3\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 489, in exec_module
exec(bytecode, module.__dict__)
File "site-packages\tensorflow\_api\v2\compat\v1\lite\experimental\nn\__init__.py", line 10, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "c:\users\pikro\anaconda3\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 489, in exec_module
exec(bytecode, module.__dict__)
File "site-packages\tensorflow\lite\python\lite.py", line 35, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "c:\users\pikro\anaconda3\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 489, in exec_module
exec(bytecode, module.__dict__)
File "site-packages\tensorflow\lite\experimental\microfrontend\python\ops\audio_microfrontend_op.py", line 30, in <module>
File "site-packages\tensorflow\python\framework\load_library.py", line 58, in load_op_library
tensorflow.python.framework.errors_impl.NotFoundError: C:\Users\pikro\PycharmProjects\NeuralStyleTransfer\dist\main2\tensorflow\lite\experimental\microfrontend\python\ops\_audio_microfrontend_op.so not found
[9892] Failed to execute script main2
How can I fix this error?
My imports:
from tkinter import *
import tensorflow as tf
import tensorflow_hub as hub
import numpy as np
import PIL.Image
I create new conda env, install tensorflow v2.1.0, created a file hook-tensorflow.py and moved it to PyInstaller

Using Pyinstaller to convert to exe.FileNotFoundError: 'C:\\Users\\{ [8240] Username}\\\_MEI98802\\astor\\VERSION'

Problem occuring in this line :
from keras import backend as K
I am converting a python source code which uses tensorflow and keras API for testing data.
Using pyinstaller to convert it into exe in Windows OS. I am getting below error related to astor file version. I don't know why i am getting this error after executing the exe file. I am getting no error while running the source code as python filename.py
Using
Python 3.7
tensorflow==1.15
keras==2.0.3
from keras import backend as K is written in exterior file which is imported to main file.
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "c:\program files\python37\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 489, in exec_module
exec(bytecode, module.__dict__)
File "site-packages\keras\__init__.py", line 3, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "c:\program files\python37\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 489, in exec_module
exec(bytecode, module.__dict__)
File "site-packages\keras\activations.py", line 3, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "c:\program files\python37\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 489, in exec_module
exec(bytecode, module.__dict__)
File "site-packages\keras\backend\__init__.py", line 73, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "c:\program files\python37\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 489, in exec_module
exec(bytecode, module.__dict__)
File "site-packages\keras\backend\tensorflow_backend.py", line 1, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "c:\program files\python37\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 489, in exec_module
exec(bytecode, module.__dict__)
File "site-packages\tensorflow\__init__.py", line 28, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "c:\program files\python37\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 489, in exec_module
exec(bytecode, module.__dict__)
File "site-packages\tensorflow\python\__init__.py", line 73, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "c:\program files\python37\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 489, in exec_module
exec(bytecode, module.__dict__)
File "site-packages\tensorflow\python\ops\standard_ops.py", line 25, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "c:\program files\python37\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 489, in exec_module
exec(bytecode, module.__dict__)
File "site-packages\tensorflow\python\autograph\__init__.py", line 37, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "c:\program files\python37\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 489, in exec_module
exec(bytecode, module.__dict__)
File "site-packages\tensorflow\python\autograph\core\converter.py", line 71, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "c:\program files\python37\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 489, in exec_module
exec(bytecode, module.__dict__)
File "site-packages\tensorflow\python\autograph\pyct\cfg.py", line 41, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "c:\program files\python37\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 489, in exec_module
exec(bytecode, module.__dict__)
File "site-packages\tensorflow\python\autograph\pyct\compiler.py", line 32, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "c:\program files\python37\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 489, in exec_module
exec(bytecode, module.__dict__)
File "site-packages\astor\__init__.py", line 24, in <module>
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\{Username}\\AppData\\Local\\Temp\\_MEI98802\\astor\\VERSION'
[8240] Failed to execute script test_exec
You could try to downgrade astor to 0.7.1 and pyinstaller to 3.5
I faced the same problem. My astor package version was 0.8.1. I changed astor version to 0.7.1. It worked for me. pyinstaller version 3.6

I installed python but my Scripts folder is empty

I downloaded python 3, and it works correctly on a basic script, but when i tried to import a package with pip in cmd, it said it didn't recognise "pip"
I'm on windows 10
I've tried to install different versions of python. I've also tried to install pip by itself at https://pip.pypa.io/en/stable/installing/.
When I try python -m ensurepip or python get-py.py i get this error
Traceback (most recent call last):
File "get-pip.py", line 22312, in <module>
main()
File "get-pip.py", line 197, in main
bootstrap(tmpdir=tmpdir)
File "get-pip.py", line 82, in bootstrap
import pip._internal
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
File "C:\Users\I56600~1\AppData\Local\Temp\tmpgkogcd_v\pip.zip\pip\_internal\__init__.py", line 40, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
File "C:\Users\I56600~1\AppData\Local\Temp\tmpgkogcd_v\pip.zip\pip\_internal\cli\autocompletion.py", line 8, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
File "C:\Users\I56600~1\AppData\Local\Temp\tmpgkogcd_v\pip.zip\pip\_internal\cli\main_parser.py", line 11, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
File "C:\Users\I56600~1\AppData\Local\Temp\tmpgkogcd_v\pip.zip\pip\_internal\commands\__init__.py", line 6, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
File "C:\Users\I56600~1\AppData\Local\Temp\tmpgkogcd_v\pip.zip\pip\_internal\commands\completion.py", line 6, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
File "C:\Users\I56600~1\AppData\Local\Temp\tmpgkogcd_v\pip.zip\pip\_internal\cli\base_command.py", line 21, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
File "C:\Users\I56600~1\AppData\Local\Temp\tmpgkogcd_v\pip.zip\pip\_internal\download.py", line 14, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
File "C:\Users\I56600~1\AppData\Local\Temp\tmpgkogcd_v\pip.zip\pip\_vendor\requests\__init__.py", line 114, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
File "C:\Users\I56600~1\AppData\Local\Temp\tmpgkogcd_v\pip.zip\pip\_vendor\requests\utils.py", line 26, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
File "C:\Users\I56600~1\AppData\Local\Temp\tmpgkogcd_v\pip.zip\pip\_vendor\requests\_internal_utils.py", line 11, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
File "C:\Users\I56600~1\AppData\Local\Temp\tmpgkogcd_v\pip.zip\pip\_vendor\requests\compat.py", line 64, in <module>
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 724, in exec_module
File "<frozen importlib._bootstrap_external>", line 859, in get_code
File "<frozen importlib._bootstrap_external>", line 917, in get_data
OSError: [Errno 9] Bad file descriptor
C:\Users\I5 6600k\Downloads>pip
'pip' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\I5 6600k\Downloads>python -m pip
C:\Users\I5 6600k\AppData\Local\Programs\Python\Python37\python.exe: No module named pip
I faced a similar issue. My system went through python installation and uninstallation couple of times. Also I created virtual environment few months back using pip.
Recently when I reinstalled python, Scripts folder was empty.
I searched for all Scripts folder from my root directory (This PC). I found some old Scripts folder containing pip packages. I removed those old Scripts folders, uninstalled python and installed again. Now it works.
I strongly recommend you to try this option. Don't forget to check "add PATH to env variable" option while installing python. Hope this helps.
Did you clicked to 'Path' when installing python? If no, then try to uninstall the python, and when edgy install of the python, click to add 'path'.

Categories

Resources