python pip安装总是失败

最近在学爬虫 使用pip命令安装包总是失败
也上网查询了很多方法尝试 还是不行 所以来提问 希望得到回答
图片说明

就是那个红字 我在家里的台式机上就可以安装成功 笔记本怎么也不行 不知道为什么

18个回答

你的bs版本弄错了,应该是 pip install beautifulsoup4
错误提式为语法错误,print后面没有括号,这是python2的写法,很明显你是下错beautifulsoup的版本了。

有可能是版本的问题 版本保持一致 或者更新python版本

这个错误显示是语法错误,那是因为你的Python环境是3.x的,你直接输入 beautifulsoup 它默认的版本是bs3, 所以你需要的命令行是 pip install beautifulsoup4。

1.Beautifulsoup官网:https://www.crummy.com/software/BeautifulSoup/
官网说明:Beautiful Soup 3 works only under Python 2.x.
确定python版本是否符合
2.排除pip问题,用pip install xlrd 测试
3.本地安装测试

(env) [fdm@ES ~]$ pip install BeautifulSoup
Collecting BeautifulSoup
  Downloading BeautifulSoup-3.2.1.tar.gz
Building wheels for collected packages: BeautifulSoup
  Running setup.py bdist_wheel for BeautifulSoup ... done
  Stored in directory: /home/fdm/.cache/pip/wheels/5e/be/6d/ed01d5d434a821557b674c9da976f60b1b93d9009447eb9d16
Successfully built BeautifulSoup
Installing collected packages: BeautifulSoup
Successfully installed BeautifulSoup-3.2.1

(env) [fdm@ES ~]$ python -V
Python 2.7.11

可能是版本问题,使用python安装目录下Scripts目录里的pip命令安装试试。

我猜你的python应该是3.x,可以试试pip install bs4

你直接到那个目录下 cmd 然后pip install 。你安装了多个版本 环境变量不一样

可能存在多个python版本,建议python -V看下版本

系统指定的python版本问题,可以在控制台输入python看看默认的版本是什么

以管理员权限登录cmd,再行安装

共18条数据 1 尾页
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
python3.7使用pip安装dlib失败,已使用pip安装cmake和boost

Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Collecting dlib Using cached https://pypi.tuna.tsinghua.edu.cn/packages/63/92/05c3b98636661cb80d190a5a777dd94effcc14c0f6893222e5ca81e74fbc/dlib-19.19.0.tar.gz (3.2 MB) Building wheels for collected packages: dlib Building wheel for dlib (setup.py) ... error ERROR: Command errored out with exit status 1: 以下是错误原因 command: 'd:\python\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Ray\\AppData\\Local\\Temp\\pip-install-adkry0ue\\dlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\Ray\\AppData\\Local\\Temp\\pip-install-adkry0ue\\dlib\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\Ray\AppData\Local\Temp\pip-wheel-s_easgnt' cwd: C:\Users\Ray\AppData\Local\Temp\pip-install-adkry0ue\dlib\ Complete output (149 lines): running bdist_wheel running build running build_py package init file 'dlib\__init__.py' not found (or not a regular file) running build_ext Building extension for Python 3.7.6 (tags/v3.7.6:43364a7ae0, Dec 19 2019, 00:42:30) [MSC v.1916 64 bit (AMD64)] Invoking CMake setup: 'cmake C:\Users\Ray\AppData\Local\Temp\pip-install-adkry0ue\dlib\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\Ray\AppData\Local\Temp\pip-install-adkry0ue\dlib\build\lib.win-amd64-3.7 -DPYTHON_EXECUTABLE=d:\python\python37\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\Ray\AppData\Local\Temp\pip-install-adkry0ue\dlib\build\lib.win-amd64-3.7 -A x64' -- Building for: Visual Studio 15 2017 -- The C compiler identification is MSVC 19.16.27034.0 -- The CXX compiler identification is MSVC 19.16.27034.0 -- Check for working C compiler: D:/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe -- Check for working C compiler: D:/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: D:/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe -- Check for working CXX compiler: D:/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found PythonInterp: D:/Python/Python37/python.exe (found version "3.7.6") -- Found PythonLibs: D:/Python/Python37/libs/Python37.lib -- pybind11 v2.2.2 -- Using CMake version: 3.16.3 -- Compiling dlib version: 19.19.0 -- SSE4 instructions can be executed by the host processor. -- AVX instructions can be executed by the host processor. -- Looking for sys/types.h -- Looking for sys/types.h - found -- Looking for stdint.h -- Looking for stdint.h - found -- Looking for stddef.h -- Looking for stddef.h - found -- Check size of void* -- Check size of void* - done -- Enabling AVX instructions -- Searching for BLAS and LAPACK -- Searching for BLAS and LAPACK -- Looking for pthread.h -- Looking for pthread.h - not found -- Found Threads: TRUE CUDA_TOOLKIT_ROOT_DIR not found or specified -- Could NOT find CUDA (missing: CUDA_TOOLKIT_ROOT_DIR CUDA_NVCC_EXECUTABLE CUDA_INCLUDE_DIRS CUDA_CUDART_LIBRARY) (Required is at least version "7.5") -- DID NOT FIND CUDA -- Disabling CUDA support for dlib. DLIB WILL NOT USE CUDA -- C++11 activated. -- Configuring done -- Generating done -- Build files have been written to: C:/Users/Ray/AppData/Local/Temp/pip-install-adkry0ue/dlib/build/temp.win-amd64-3.7/Release Invoking CMake build: 'cmake --build . --config Release -- /m' 用于 .NET Framework 的 Microsoft (R) 生成引擎版本 15.9.21+g9802d43bc3 版权所有(C) Microsoft Corporation。保留所有权利。 D:\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppBuild.targets(399,5): warning MSB8029: 中间目录或输出目录无法驻留在临时目录 下,因为这可能会导致增量生成出现问题。 [C:\Users\Ray\AppData\Local\Temp\pip-install-adkry0ue\dlib\build\temp.win-amd64-3.7\Release\ZERO_CHECK.vcxproj] Checking Build System D:\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppBuild.targets(399,5): warning MSB8029: 中间目录或输出目录无法驻留在临时目录 下,因为这可能会导致增量生成出现问题。 [C:\Users\Ray\AppData\Local\Temp\pip-install-adkry0ue\dlib\build\temp.win-amd64-3.7\Release\dlib_build\dlib.vcxproj] Building Custom Rule C:/Users/Ray/AppData/Local/Temp/pip-install-adkry0ue/dlib/dlib/CMakeLists.txt base64_kernel_1.cpp bigint_kernel_1.cpp bigint_kernel_2.cpp bit_stream_kernel_1.cpp entropy_decoder_kernel_1.cpp entropy_decoder_kernel_2.cpp entropy_encoder_kernel_1.cpp entropy_encoder_kernel_2.cpp md5_kernel_1.cpp tokenizer_kernel_1.cpp unicode.cpp image_dataset_metadata.cpp mnist.cpp global_function_search.cpp kalman_filter.cpp test_for_odr_violations.cpp auto.cpp sockets_kernel_1.cpp c:\users\ray\appdata\local\temp\pip-install-adkry0ue\dlib\dlib\sockets\../dlib_basic_cpp_build_tutorial.txt(1): fatal error C1189: #error: "Don't write #include <dlib/all/source.cpp> in your code." (编译源文件 C:\Users\Ray\AppData\Local\Temp\pip-install-adkry0ue\dlib\dlib\sockets\sockets_kernel_1.cpp) [C:\Users\Ray\AppData\Local\Temp\pip-install-adkry0ue\dlib\build\temp.win-amd64-3.7\Release\dlib_build\dlib.vcxproj] bsp.cpp dir_nav_kernel_1.cpp dir_nav_kernel_2.cpp dir_nav_extensions.cpp linker_kernel_1.cpp extra_logger_headers.cpp logger_kernel_1.cpp logger_config_file.cpp misc_api_kernel_1.cpp misc_api_kernel_2.cpp sockets_extensions.cpp sockets_kernel_2.cpp sockstreambuf.cpp sockstreambuf_unbuffered.cpp server_kernel.cpp server_iostream.cpp server_http.cpp multithreaded_object_extension.cpp threaded_object_extension.cpp threads_kernel_1.cpp threads_kernel_2.cpp threads_kernel_shared.cpp thread_pool_extension.cpp async.cpp timer.cpp stack_trace.cpp cpu_dlib.cpp tensor_tools.cpp fonts.cpp widgets.cpp drawable.cpp canvas_drawing.cpp style.cpp base_widgets.cpp gui_core_kernel_1.cpp gui_core_kernel_2.cpp png_loader.cpp save_png.cpp jpeg_loader.cpp save_jpeg.cpp Traceback (most recent call last): File "<string>", line 1, in <module> File "C:\Users\Ray\AppData\Local\Temp\pip-install-adkry0ue\dlib\setup.py", line 261, in <module> 'Topic :: Software Development', File "d:\python\python37\lib\site-packages\setuptools\__init__.py", line 145, in setup return distutils.core.setup(**attrs) File "d:\python\python37\lib\distutils\core.py", line 148, in setup dist.run_commands() File "d:\python\python37\lib\distutils\dist.py", line 966, in run_commands self.run_command(cmd) File "d:\python\python37\lib\distutils\dist.py", line 985, in run_command cmd_obj.run() File "d:\python\python37\lib\site-packages\wheel\bdist_wheel.py", line 223, in run self.run_command('build') File "d:\python\python37\lib\distutils\cmd.py", line 313, in run_command self.distribution.run_command(command) File "d:\python\python37\lib\distutils\dist.py", line 985, in run_command cmd_obj.run() File "d:\python\python37\lib\distutils\command\build.py", line 135, in run self.run_command(cmd_name) File "d:\python\python37\lib\distutils\cmd.py", line 313, in run_command self.distribution.run_command(command) File "d:\python\python37\lib\distutils\dist.py", line 985, in run_command cmd_obj.run() File "C:\Users\Ray\AppData\Local\Temp\pip-install-adkry0ue\dlib\setup.py", line 135, in run self.build_extension(ext) File "C:\Users\Ray\AppData\Local\Temp\pip-install-adkry0ue\dlib\setup.py", line 175, in build_extension subprocess.check_call(cmake_build, cwd=build_folder) File "d:\python\python37\lib\subprocess.py", line 363, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '/m']' returned non-zero exit status 1. ---------------------------------------- ERROR: Failed building wheel for dlib Running setup.py clean for dlib Failed to build dlib Installing collected packages: dlib Running setup.py install for dlib ... error ERROR: Command errored out with exit status 1: command: 'd:\python\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Ray\\AppData\\Local\\Temp\\pip-install-adkry0ue\\dlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\Ray\\AppData\\Local\\Temp\\pip-install-adkry0ue\\dlib\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Ray\AppData\Local\Temp\pip-record-70rug5ub\install-record.txt' --single-version-externally-managed --compile --install-headers 'd:\python\python37\Include\dlib' cwd: C:\Users\Ray\AppData\Local\Temp\pip-install-adkry0ue\dlib\ Complete output (151 lines): running install running build running build_py package init file 'dlib\__init__.py' not found (or not a regular file) running build_ext Building extension for Python 3.7.6 (tags/v3.7.6:43364a7ae0, Dec 19 2019, 00:42:30) [MSC v.1916 64 bit (AMD64)] Invoking CMake setup: 'cmake C:\Users\Ray\AppData\Local\Temp\pip-install-adkry0ue\dlib\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\Ray\AppData\Local\Temp\pip-install-adkry0ue\dlib\build\lib.win-amd64-3.7 -DPYTHON_EXECUTABLE=d:\python\python37\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\Ray\AppData\Local\Temp\pip-install-adkry0ue\dlib\build\lib.win-amd64-3.7 -A x64' -- Building for: Visual Studio 15 2017 -- The C compiler identification is MSVC 19.16.27034.0 -- The CXX compiler identification is MSVC 19.16.27034.0 -- Check for working C compiler: D:/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe -- Check for working C compiler: D:/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: D:/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe -- Check for working CXX compiler: D:/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found PythonInterp: D:/Python/Python37/python.exe (found version "3.7.6") -- Found PythonLibs: D:/Python/Python37/libs/Python37.lib -- pybind11 v2.2.2 -- Using CMake version: 3.16.3 -- Compiling dlib version: 19.19.0 -- SSE4 instructions can be executed by the host processor. -- AVX instructions can be executed by the host processor. -- Looking for sys/types.h -- Looking for sys/types.h - found -- Looking for stdint.h -- Looking for stdint.h - found -- Looking for stddef.h -- Looking for stddef.h - found -- Check size of void* -- Check size of void* - done -- Enabling AVX instructions -- Searching for BLAS and LAPACK -- Searching for BLAS and LAPACK -- Looking for pthread.h -- Looking for pthread.h - not found -- Found Threads: TRUE CUDA_TOOLKIT_ROOT_DIR not found or specified -- Could NOT find CUDA (missing: CUDA_TOOLKIT_ROOT_DIR CUDA_NVCC_EXECUTABLE CUDA_INCLUDE_DIRS CUDA_CUDART_LIBRARY) (Required is at least version "7.5") -- DID NOT FIND CUDA -- Disabling CUDA support for dlib. DLIB WILL NOT USE CUDA -- C++11 activated. -- Configuring done -- Generating done -- Build files have been written to: C:/Users/Ray/AppData/Local/Temp/pip-install-adkry0ue/dlib/build/temp.win-amd64-3.7/Release Invoking CMake build: 'cmake --build . --config Release -- /m' 用于 .NET Framework 的 Microsoft (R) 生成引擎版本 15.9.21+g9802d43bc3 版权所有(C) Microsoft Corporation。保留所有权利。 D:\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppBuild.targets(399,5): warning MSB8029: 中间目录或输出目录无法驻留在临时目 录下,因为这可能会导致增量生成出现问题。 [C:\Users\Ray\AppData\Local\Temp\pip-install-adkry0ue\dlib\build\temp.win-amd64-3.7\Release\ZERO_CHECK.vcxproj] Checking Build System D:\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppBuild.targets(399,5): warning MSB8029: 中间目录或输出目录无法驻留在临时目 录下,因为这可能会导致增量生成出现问题。 [C:\Users\Ray\AppData\Local\Temp\pip-install-adkry0ue\dlib\build\temp.win-amd64-3.7\Release\dlib_build\dlib.vcxproj] Building Custom Rule C:/Users/Ray/AppData/Local/Temp/pip-install-adkry0ue/dlib/dlib/CMakeLists.txt base64_kernel_1.cpp bigint_kernel_1.cpp bigint_kernel_2.cpp bit_stream_kernel_1.cpp entropy_decoder_kernel_1.cpp entropy_decoder_kernel_2.cpp entropy_encoder_kernel_1.cpp entropy_encoder_kernel_2.cpp md5_kernel_1.cpp tokenizer_kernel_1.cpp unicode.cpp image_dataset_metadata.cpp mnist.cpp global_function_search.cpp kalman_filter.cpp test_for_odr_violations.cpp auto.cpp sockets_kernel_1.cpp c:\users\ray\appdata\local\temp\pip-install-adkry0ue\dlib\dlib\sockets\../dlib_basic_cpp_build_tutorial.txt(1): fatal error C1189: #error: "Don't write #include <dlib/all/source.cpp> in your code." (编译源文件 C:\Users\Ray\AppData\Local\Temp\pip-install-adkry0ue\dlib\dlib\sockets\sockets_kernel_1.cpp) [C:\Users\Ray\AppData\Local\Temp\pip-install-adkry0ue\dlib\build\temp.win-amd64-3.7\Release\dlib_build\dlib.vcxproj] bsp.cpp dir_nav_kernel_1.cpp dir_nav_kernel_2.cpp dir_nav_extensions.cpp linker_kernel_1.cpp extra_logger_headers.cpp logger_kernel_1.cpp logger_config_file.cpp misc_api_kernel_1.cpp misc_api_kernel_2.cpp sockets_extensions.cpp sockets_kernel_2.cpp sockstreambuf.cpp sockstreambuf_unbuffered.cpp server_kernel.cpp server_iostream.cpp server_http.cpp multithreaded_object_extension.cpp threaded_object_extension.cpp threads_kernel_1.cpp threads_kernel_2.cpp threads_kernel_shared.cpp thread_pool_extension.cpp async.cpp timer.cpp stack_trace.cpp cpu_dlib.cpp tensor_tools.cpp fonts.cpp widgets.cpp drawable.cpp canvas_drawing.cpp style.cpp base_widgets.cpp gui_core_kernel_1.cpp gui_core_kernel_2.cpp png_loader.cpp save_png.cpp jpeg_loader.cpp save_jpeg.cpp Traceback (most recent call last): File "<string>", line 1, in <module> File "C:\Users\Ray\AppData\Local\Temp\pip-install-adkry0ue\dlib\setup.py", line 261, in <module> 'Topic :: Software Development', File "d:\python\python37\lib\site-packages\setuptools\__init__.py", line 145, in setup return distutils.core.setup(**attrs) File "d:\python\python37\lib\distutils\core.py", line 148, in setup dist.run_commands() File "d:\python\python37\lib\distutils\dist.py", line 966, in run_commands self.run_command(cmd) File "d:\python\python37\lib\distutils\dist.py", line 985, in run_command cmd_obj.run() File "d:\python\python37\lib\site-packages\setuptools\command\install.py", line 61, in run return orig.install.run(self) File "d:\python\python37\lib\distutils\command\install.py", line 545, in run self.run_command('build') File "d:\python\python37\lib\distutils\cmd.py", line 313, in run_command self.distribution.run_command(command) File "d:\python\python37\lib\distutils\dist.py", line 985, in run_command cmd_obj.run() File "d:\python\python37\lib\distutils\command\build.py", line 135, in run self.run_command(cmd_name) File "d:\python\python37\lib\distutils\cmd.py", line 313, in run_command self.distribution.run_command(command) File "d:\python\python37\lib\distutils\dist.py", line 985, in run_command cmd_obj.run() File "C:\Users\Ray\AppData\Local\Temp\pip-install-adkry0ue\dlib\setup.py", line 135, in run self.build_extension(ext) File "C:\Users\Ray\AppData\Local\Temp\pip-install-adkry0ue\dlib\setup.py", line 175, in build_extension subprocess.check_call(cmake_build, cwd=build_folder) File "d:\python\python37\lib\subprocess.py", line 363, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '/m']' returned non-zero exit status 1. ---------------------------------------- ERROR: Command errored out with exit status 1: 'd:\python\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Ray\\AppData\\Local\\Temp\\pip-install-adkry0ue\\dlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\Ray\\AppData\\Local\\Temp\\pip-install-adkry0ue\\dlib\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Ray\AppData\Local\Temp\pip-record-70rug5ub\install-record.txt' --single-version-externally-managed --compile --install-headers 'd:\python\python37\Include\dlib' Check the logs for full command output.

关于Mac下python pip版本问题以及pycharm安装python第三方库失败问题

我的电脑是mac 10.15版本 目前有两个python: 1. 系统自带Python 2.7.16 2. 自己安装python Python 3.7.3 在终端查询pip版本,结果是2.7的那个: pip 19.3.1 from /Library/Python/2.7/site-packages/pip (python 2.7) 查询pip3,结果显示错误: xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun 好像问题就是在这里,我在终端用 pip install 安装python第三方库的时候总会有问题,提示pip版本过低,我想更新pip又会失败;或者根本无法安装。 然后我就选择从pycharm上搜索第三方库并安装,奇怪的是有的库可以成功安装,有的库安装失败并提示说pip版本过低,让我尝试从终端安装,可是从终端安装的话又会遇到之前的问题。 请问这个该怎么解决?

Python pip安装出现问题

安装时出现 ![图片说明](https://img-ask.csdn.net/upload/201806/26/1529990278_356901.png) 安装了get-pip.py 也设置了环境变量..

python使用pip安装multiprocess报错

Windows8下使用pip -install multiprocessing 安装包时报了这个错误,我用的是python3.6,为什么会安装出python2中的包?

Python pip安装scrapy 一直报错求解答,谢谢

![图片说明](https://img-ask.csdn.net/upload/201803/03/1520089046_806117.png) PYTHON版本是3.5.3 LXML已安装完毕

python用pip安装第三方库总是不成功,求教

![图片说明](https://img-ask.csdn.net/upload/201804/14/1523677538_799309.jpg)

python pip 安装flask-socketio显示已存在,但是运行出错

python pip 安装flask-socketio时显示如图 可是pycharm运行代码的时候又不行,试了好几个方法了,那位大佬帮忙看看 ![图片说明](https://img-ask.csdn.net/upload/202004/29/1588135422_97724.png)![图片说明] ![图片说明](https://img-ask.csdn.net/upload/202004/29/1588135470_378829.png)

python使用pip安装beautifulsoup4总是抛异常安装不了

python使用pip安装beautifulsoup4总是抛异常安装不了--- 求解答 ------------------------------------------------------------ D:\Python27\Scripts>pip install beautifulsoup4 Collecting beautifulsoup4 D:\Python27\lib\site-packages\pip\_vendor\requests\packages\urllib3\util\ssl_.py:318: SNIMissi TPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not avail tform. This may cause the server to present an incorrect TLS certificate, which can cause vali You can upgrade to a newer version of Python to solve this. For more information, see https:/ docs.org/en/latest/security.html#snimissingwarning. SNIMissingWarning D:\Python27\lib\site-packages\pip\_vendor\requests\packages\urllib3\util\ssl_.py:122: Insecure A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropr ause certain SSL connections to fail. You can upgrade to a newer version of Python to solve th ormation, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning. InsecurePlatformWarning Downloading beautifulsoup4-4.4.1-py2-none-any.whl (81kB) Exception: Traceback (most recent call last): File "D:\Python27\lib\site-packages\pip\basecommand.py", line 215, in main status = self.run(options, args) File "D:\Python27\lib\site-packages\pip\commands\install.py", line 299, in run requirement_set.prepare_files(finder) File "D:\Python27\lib\site-packages\pip\req\req_set.py", line 370, in prepare_files ignore_dependencies=self.ignore_dependencies)) File "D:\Python27\lib\site-packages\pip\req\req_set.py", line 587, in _prepare_file session=self.session, hashes=hashes) File "D:\Python27\lib\site-packages\pip\download.py", line 810, in unpack_url hashes=hashes File "D:\Python27\lib\site-packages\pip\download.py", line 649, in unpack_http_url hashes) File "D:\Python27\lib\site-packages\pip\download.py", line 871, in _download_http_url _download_url(resp, link, content_file, hashes) File "D:\Python27\lib\site-packages\pip\download.py", line 595, in _download_url hashes.check_against_chunks(downloaded_chunks) File "D:\Python27\lib\site-packages\pip\utils\hashes.py", line 46, in check_against_chunks for chunk in chunks: File "D:\Python27\lib\site-packages\pip\download.py", line 563, in written_chunks for chunk in chunks: File "D:\Python27\lib\site-packages\pip\utils\ui.py", line 139, in iter for x in it: File "D:\Python27\lib\site-packages\pip\download.py", line 552, in resp_read decode_content=False): File "D:\Python27\lib\site-packages\pip\_vendor\requests\packages\urllib3\response.py", line data = self.read(amt=amt, decode_content=decode_content) File "D:\Python27\lib\site-packages\pip\_vendor\requests\packages\urllib3\response.py", line flush_decoder = True File "D:\Python27\lib\contextlib.py", line 35, in __exit__ self.gen.throw(type, value, traceback) File "D:\Python27\lib\site-packages\pip\_vendor\requests\packages\urllib3\response.py", line catcher raise ReadTimeoutError(self._pool, None, 'Read timed out.') ReadTimeoutError: HTTPSConnectionPool(host='pypi.python.org', port=443): Read timed out.

安装pip install request 失败,求大神!

![ 图片说明](https://img-ask.csdn.net/upload/201810/25/1540425719_590746.png) 一开始报错,然后python -m pip install --upgrade pip升级了pip,再安装request就成了:C:\Users\Administrator>pip install request Collecting request Installing collected packages: request Exception: Traceback (most recent call last): File "d:\python\lib\site-packages\pip\_internal\cli\base_command.py", line 143, in main status = self.run(options, args) File "d:\python\lib\site-packages\pip\_internal\commands\install.py", line 366, in run use_user_site=options.use_user_site, File "d:\python\lib\site-packages\pip\_internal\req\__init__.py", line 49, in install_given_reqs **kwargs File "d:\python\lib\site-packages\pip\_internal\req\req_install.py", line 760, in install use_user_site=use_user_site, pycompile=pycompile, File "d:\python\lib\site-packages\pip\_internal\req\req_install.py", line 382, in move_wheel_files warn_script_location=warn_script_location, File "d:\python\lib\site-packages\pip\_internal\wheel.py", line 326, in move_wheel_files assert info_dir, "%s .dist-info directory not found" % req AssertionError: request .dist-info directory not found

python更新pip失败,困扰了我好久

更新pip老是出现下列一大串的文字,我在网上查了许多方法,都没用,有哪位大佬能说一下有什么方法解决这个问题。 这是使用管理员的运行 C:\Windows\system32>python -m pip install --upgrade pip WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/pip/ Collecting pip Downloading https://files.pythonhosted.org/packages/54/0c/d01aa759fdc501a58f431eb594a17495f15b88da142ce14b5845662c13f3/pip-20.0.2-py2.py3-none-any.whl (1.4MB) |█████████████████████▌ | 962kB 2.9kB/s eta 0:02:44ERROR: Exception: Traceback (most recent call last): File "D:\Program Files\python\lib\site-packages\pip\_vendor\urllib3\response.py", line 397, in _error_catcher yield File "D:\Program Files\python\lib\site-packages\pip\_vendor\urllib3\response.py", line 479, in read data = self._fp.read(amt) File "D:\Program Files\python\lib\site-packages\pip\_vendor\cachecontrol\filewrapper.py", line 62, in read data = self.__fp.read(amt) File "D:\Program Files\python\lib\http\client.py", line 454, in read n = self.readinto(b) File "D:\Program Files\python\lib\http\client.py", line 498, in readinto n = self.fp.readinto(b) File "D:\Program Files\python\lib\socket.py", line 669, in readinto return self._sock.recv_into(b) File "D:\Program Files\python\lib\ssl.py", line 1241, in recv_into return self.read(nbytes, buffer) File "D:\Program Files\python\lib\ssl.py", line 1099, in read return self._sslobj.read(len, buffer) socket.timeout: The read operation timed out During handling of the above exception, another exception occurred: Traceback (most recent call last): File "D:\Program Files\python\lib\site-packages\pip\_internal\cli\base_command.py", line 188, in main status = self.run(options, args) File "D:\Program Files\python\lib\site-packages\pip\_internal\commands\install.py", line 345, in run resolver.resolve(requirement_set) File "D:\Program Files\python\lib\site-packages\pip\_internal\legacy_resolve.py", line 196, in resolve self._resolve_one(requirement_set, req) File "D:\Program Files\python\lib\site-packages\pip\_internal\legacy_resolve.py", line 359, in _resolve_one abstract_dist = self._get_abstract_dist_for(req_to_install) File "D:\Program Files\python\lib\site-packages\pip\_internal\legacy_resolve.py", line 305, in _get_abstract_dist_for abstract_dist = self.preparer.prepare_linked_requirement( File "D:\Program Files\python\lib\site-packages\pip\_internal\operations\prepare.py", line 195, in prepare_linked_requirement unpack_url( File "D:\Program Files\python\lib\site-packages\pip\_internal\download.py", line 1058, in unpack_url unpack_http_url( File "D:\Program Files\python\lib\site-packages\pip\_internal\download.py", line 920, in unpack_http_url from_path, content_type = _download_http_url(link, File "D:\Program Files\python\lib\site-packages\pip\_internal\download.py", line 1152, in _download_http_url _download_url(resp, link, content_file, hashes, progress_bar) File "D:\Program Files\python\lib\site-packages\pip\_internal\download.py", line 861, in _download_url hashes.check_against_chunks(downloaded_chunks) File "D:\Program Files\python\lib\site-packages\pip\_internal\utils\hashes.py", line 75, in check_against_chunks for chunk in chunks: File "D:\Program Files\python\lib\site-packages\pip\_internal\download.py", line 829, in written_chunks for chunk in chunks: File "D:\Program Files\python\lib\site-packages\pip\_internal\utils\ui.py", line 156, in iter for x in it: File "D:\Program Files\python\lib\site-packages\pip\_internal\download.py", line 794, in resp_read for chunk in resp.raw.stream( File "D:\Program Files\python\lib\site-packages\pip\_vendor\urllib3\response.py", line 531, in stream data = self.read(amt=amt, decode_content=decode_content) File "D:\Program Files\python\lib\site-packages\pip\_vendor\urllib3\response.py", line 496, in read raise IncompleteRead(self._fp_bytes_read, self.length_remaining) File "D:\Program Files\python\lib\contextlib.py", line 131, in __exit__ self.gen.throw(type, value, traceback) File "D:\Program Files\python\lib\site-packages\pip\_vendor\urllib3\response.py", line 402, in _error_catcher raise ReadTimeoutError(self._pool, None, 'Read timed out.') pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out. WARNING: You are using pip version 19.2.3, however version 20.0.2 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command.

python下pip安装总是报 AssertionError

PS C:\WINDOWS\system32> pip install sys Collecting sys Using cached sys-0.9.tar.gz Complete output from command python setup.py egg_info: Traceback (most recent call last): File "<string>", line 1, in <module> File "c:\users\ynf19\appdata\local\temp\pip-build-9qorpr\sys\setup.py", line 1, in <module> raise AssertionError("This package must not be installed from pypi") AssertionError: This package must not be installed from pypi ![图片说明](https://img-ask.csdn.net/upload/201612/28/1482937136_286505.png)

python crypto安装失败

![图片说明](https://img-ask.csdn.net/upload/201705/23/1495469809_204866.png) 这个怎么解决那??

看看我吧!求求了!Python安装requests出错,怎么办?

我是第一次学习python,安装requests库,我首先是在cmd里查找了我的script文件夹里是否有pip.exe,有,我接着pip install requests,接着提示我更新,我也Python -m pip install --user --upgrade pip更新. 但是还是import requests不成功 ![图片说明](https://img-ask.csdn.net/upload/202001/31/1580450434_278392.png) 我再一次在cmd尝试pip install requests,就出现错误了 ![图片说明](https://img-ask.csdn.net/upload/202001/31/1580450564_647266.png) 警告是说我因为升级不可以再用原来的pip命令 要加-m 我试了一下还是不可以 我也尝试了百度等方法,但是都不太明白错在哪里 拜托各位大神,帮我看看吧,谢谢啦!

在MAC里用pip3 安装 pygame 安装失败,提示如下,帮我看看

Command "/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 -u -c " import setuptools, tokenize;__file__='/private/var/folders/vb/1lllytm15dx0h3b0llq4hrl00000gn/T/pip-req-build-hqkmtxwd/setup.py'; f=getattr(tokenize, 'open', open)(__file__); code=f.read().replace('\r\n', '\n'); f.close(); exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/vb/1lllytm15dx0h3b0llq4hrl00000gn/T/pip-record-lfu6q8nv/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /private/var/folders/vb/1lllytm15dx0h3b0llq4hrl00000gn/T/pip-req-build-hqkmtxwd/

python3 安装pcap失败,有详细描述 求解!!

求解python3.6.0 32位如何安装pcap包 我看网上说需要先安装winpcap,我下载了之后替换了,pip3 install pypcap 编译失败,提示 Creating library build\temp.win32-3.6\Release\pcap.cp36-win32.lib and object build\temp.win32-3.6\Release\pcap.cp36-win32.exp pcap.obj : error LNK2001: unresolved external symbol _pcap_set_rfmon pcap.obj : error LNK2001: unresolved external symbol _pcap_set_immediate_mode build\lib.win32-3.6\pcap.cp36-win32.pyd : fatal error LNK1120: 2 unresolved externals error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\link.exe' failed with exit status 1120 之后我按照 [](https://blog.csdn.net/weixin_39078597/article/details/78995012 "") 这篇博客里的内容做了 可以编译安装成功了 pypcap1.2.2.但是在python里导入的时候提示ImportError: DLL load failed: 找不到指定的程序。 之后我去查看了python下的Lib\site-packages文件夹,里面只有一个pypcap-1.2.2-py3.6.egg-info文件夹,没有pcap文件夹。 求各位大神解答,或者告诉学弟python3应该用什么库抓包比较方便

Windows使用pip命令安装jupyter的错误

![图片说明](https://img-ask.csdn.net/upload/201908/29/1567087487_961468.png)![图片说明](https://img-ask.csdn.net/upload/201908/29/1567087501_994294.png) pip 已经更新到最新版本,安装时还是有问题

python 安装autopy3失败

Anaconda 3.5.2 使用pip安装: pip install autopy3 显示结果如下: ![图片说明](https://img-ask.csdn.net/upload/201709/19/1505836616_645920.png)

python3.7配置了pip,安装3.7对应的pygame一直安装不成功显示找不到对应是什么问题?

如图一,python3.7配置了pip19.3.1,安装3.7对应的pygame一直安装不成功,提示找不到对应版本,求教下这个怎么解决?![图片说明](https://img-ask.csdn.net/upload/201912/02/1575216297_77750.png) 使用powershell配置,结果如下: ![图片说明](https://img-ask.csdn.net/upload/201912/02/1575216352_197983.png)

大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了

大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、电子书搜索 对于大部分程序员...

在中国程序员是青春饭吗?

今年,我也32了 ,为了不给大家误导,咨询了猎头、圈内好友,以及年过35岁的几位老程序员……舍了老脸去揭人家伤疤……希望能给大家以帮助,记得帮我点赞哦。 目录: 你以为的人生 一次又一次的伤害 猎头界的真相 如何应对互联网行业的「中年危机」 一、你以为的人生 刚入行时,拿着傲人的工资,想着好好干,以为我们的人生是这样的: 等真到了那一天,你会发现,你的人生很可能是这样的: ...

程序员请照顾好自己,周末病魔差点一套带走我。

程序员在一个周末的时间,得了重病,差点当场去世,还好及时挽救回来了。

技术大佬:我去,你写的 switch 语句也太老土了吧

昨天早上通过远程的方式 review 了两名新来同事的代码,大部分代码都写得很漂亮,严谨的同时注释也很到位,这令我非常满意。但当我看到他们当中有一个人写的 switch 语句时,还是忍不住破口大骂:“我擦,小王,你丫写的 switch 语句也太老土了吧!” 来看看小王写的代码吧,看完不要骂我装逼啊。 private static String createPlayer(PlayerTypes p...

和黑客斗争的 6 天!

互联网公司工作,很难避免不和黑客们打交道,我呆过的两家互联网公司,几乎每月每天每分钟都有黑客在公司网站上扫描。有的是寻找 Sql 注入的缺口,有的是寻找线上服务器可能存在的漏洞,大部分都...

点沙成金:英特尔芯片制造全过程揭密

“亚马逊丛林里的蝴蝶扇动几下翅膀就可能引起两周后美国德州的一次飓风……” 这句人人皆知的话最初用来描述非线性系统中微小参数的变化所引起的系统极大变化。 而在更长的时间尺度内,我们所生活的这个世界就是这样一个异常复杂的非线性系统…… 水泥、穹顶、透视——关于时间与技艺的蝴蝶效应 公元前3000年,古埃及人将尼罗河中挖出的泥浆与纳特龙盐湖中的矿物盐混合,再掺入煅烧石灰石制成的石灰,由此得来了人...

讲一个程序员如何副业月赚三万的真实故事

loonggg读完需要3分钟速读仅需 1 分钟大家好,我是你们的校长。我之前讲过,这年头,只要肯动脑,肯行动,程序员凭借自己的技术,赚钱的方式还是有很多种的。仅仅靠在公司出卖自己的劳动时...

上班一个月,后悔当初着急入职的选择了

最近有个老铁,告诉我说,上班一个月,后悔当初着急入职现在公司了。他之前在美图做手机研发,今年美图那边今年也有一波组织优化调整,他是其中一个,在协商离职后,当时捉急找工作上班,因为有房贷供着,不能没有收入来源。所以匆忙选了一家公司,实际上是一个大型外包公司,主要派遣给其他手机厂商做外包项目。**当时承诺待遇还不错,所以就立马入职去上班了。但是后面入职后,发现薪酬待遇这块并不是HR所说那样,那个HR自...

女程序员,为什么比男程序员少???

昨天看到一档综艺节目,讨论了两个话题:(1)中国学生的数学成绩,平均下来看,会比国外好?为什么?(2)男生的数学成绩,平均下来看,会比女生好?为什么?同时,我又联想到了一个技术圈经常讨...

副业收入是我做程序媛的3倍,工作外的B面人生是怎样的?

提到“程序员”,多数人脑海里首先想到的大约是:为人木讷、薪水超高、工作枯燥…… 然而,当离开工作岗位,撕去层层标签,脱下“程序员”这身外套,有的人生动又有趣,马上展现出了完全不同的A/B面人生! 不论是简单的爱好,还是正经的副业,他们都干得同样出色。偶尔,还能和程序员的特质结合,产生奇妙的“化学反应”。 @Charlotte:平日素颜示人,周末美妆博主 大家都以为程序媛也个个不修边幅,但我们也许...

MySQL数据库面试题(2020最新版)

文章目录数据库基础知识为什么要使用数据库什么是SQL?什么是MySQL?数据库三大范式是什么mysql有关权限的表都有哪几个MySQL的binlog有有几种录入格式?分别有什么区别?数据类型mysql有哪些数据类型引擎MySQL存储引擎MyISAM与InnoDB区别MyISAM索引与InnoDB索引的区别?InnoDB引擎的4大特性存储引擎选择索引什么是索引?索引有哪些优缺点?索引使用场景(重点)...

如果你是老板,你会不会踢了这样的员工?

有个好朋友ZS,是技术总监,昨天问我:“有一个老下属,跟了我很多年,做事勤勤恳恳,主动性也很好。但随着公司的发展,他的进步速度,跟不上团队的步伐了,有点...

我入职阿里后,才知道原来简历这么写

私下里,有不少读者问我:“二哥,如何才能写出一份专业的技术简历呢?我总感觉自己写的简历太烂了,所以投了无数份,都石沉大海了。”说实话,我自己好多年没有写过简历了,但我认识的一个同行,他在阿里,给我说了一些他当年写简历的方法论,我感觉太牛逼了,实在是忍不住,就分享了出来,希望能够帮助到你。 01、简历的本质 作为简历的撰写者,你必须要搞清楚一点,简历的本质是什么,它就是为了来销售你的价值主张的。往深...

我说我不会算法,阿里把我挂了。

不说了,字节跳动也反手把我挂了。

优雅的替换if-else语句

场景 日常开发,if-else语句写的不少吧??当逻辑分支非常多的时候,if-else套了一层又一层,虽然业务功能倒是实现了,但是看起来是真的很不优雅,尤其是对于我这种有强迫症的程序"猿",看到这么多if-else,脑袋瓜子就嗡嗡的,总想着解锁新姿势:干掉过多的if-else!!!本文将介绍三板斧手段: 优先判断条件,条件不满足的,逻辑及时中断返回; 采用策略模式+工厂模式; 结合注解,锦...

离职半年了,老东家又发 offer,回不回?

有小伙伴问松哥这个问题,他在上海某公司,在离职了几个月后,前公司的领导联系到他,希望他能够返聘回去,他很纠结要不要回去? 俗话说好马不吃回头草,但是这个小伙伴既然感到纠结了,我觉得至少说明了两个问题:1.曾经的公司还不错;2.现在的日子也不是很如意。否则应该就不会纠结了。 老实说,松哥之前也有过类似的经历,今天就来和小伙伴们聊聊回头草到底吃不吃。 首先一个基本观点,就是离职了也没必要和老东家弄的苦...

为什么你不想学习?只想玩?人是如何一步一步废掉的

不知道是不是只有我这样子,还是你们也有过类似的经历。 上学的时候总有很多光辉历史,学年名列前茅,或者单科目大佬,但是虽然慢慢地长大了,你开始懈怠了,开始废掉了。。。 什么?你说不知道具体的情况是怎么样的? 我来告诉你: 你常常潜意识里或者心理觉得,自己真正的生活或者奋斗还没有开始。总是幻想着自己还拥有大把时间,还有无限的可能,自己还能逆风翻盘,只不是自己还没开始罢了,自己以后肯定会变得特别厉害...

男生更看重女生的身材脸蛋,还是思想?

往往,我们看不进去大段大段的逻辑。深刻的哲理,往往短而精悍,一阵见血。问:产品经理挺漂亮的,有点心动,但不知道合不合得来。男生更看重女生的身材脸蛋,还是...

为什么程序员做外包会被瞧不起?

二哥,有个事想询问下您的意见,您觉得应届生值得去外包吗?公司虽然挺大的,中xx,但待遇感觉挺低,马上要报到,挺纠结的。

当HR压你价,说你只值7K,你该怎么回答?

当HR压你价,说你只值7K时,你可以流畅地回答,记住,是流畅,不能犹豫。 礼貌地说:“7K是吗?了解了。嗯~其实我对贵司的面试官印象很好。只不过,现在我的手头上已经有一份11K的offer。来面试,主要也是自己对贵司挺有兴趣的,所以过来看看……”(未完) 这段话主要是陪HR互诈的同时,从公司兴趣,公司职员印象上,都给予对方正面的肯定,既能提升HR的好感度,又能让谈判气氛融洽,为后面的发挥留足空间。...

面试:第十六章:Java中级开发(16k)

HashMap底层实现原理,红黑树,B+树,B树的结构原理 Spring的AOP和IOC是什么?它们常见的使用场景有哪些?Spring事务,事务的属性,传播行为,数据库隔离级别 Spring和SpringMVC,MyBatis以及SpringBoot的注解分别有哪些?SpringMVC的工作原理,SpringBoot框架的优点,MyBatis框架的优点 SpringCould组件有哪些,他们...

面试阿里p7,被按在地上摩擦,鬼知道我经历了什么?

面试阿里p7被问到的问题(当时我只知道第一个):@Conditional是做什么的?@Conditional多个条件是什么逻辑关系?条件判断在什么时候执...

你打算用Java 8一辈子都不打算升级到Java 14,真香

我们程序员应该抱着尝鲜、猎奇的心态,否则就容易固步自封,技术停滞不前。

无代码时代来临,程序员如何保住饭碗?

编程语言层出不穷,从最初的机器语言到如今2500种以上的高级语言,程序员们大呼“学到头秃”。程序员一边面临编程语言不断推陈出新,一边面临由于许多代码已存在,程序员编写新应用程序时存在重复“搬砖”的现象。 无代码/低代码编程应运而生。无代码/低代码是一种创建应用的方法,它可以让开发者使用最少的编码知识来快速开发应用程序。开发者通过图形界面中,可视化建模来组装和配置应用程序。这样一来,开发者直...

面试了一个 31 岁程序员,让我有所触动,30岁以上的程序员该何去何从?

最近面试了一个31岁8年经验的程序猿,让我有点感慨,大龄程序猿该何去何从。

大三实习生,字节跳动面经分享,已拿Offer

说实话,自己的算法,我一个不会,太难了吧

程序员垃圾简历长什么样?

已经连续五年参加大厂校招、社招的技术面试工作,简历看的不下于万份 这篇文章会用实例告诉你,什么是差的程序员简历! 疫情快要结束了,各个公司也都开始春招了,作为即将红遍大江南北的新晋UP主,那当然要为小伙伴们做点事(手动狗头)。 就在公众号里公开征简历,义务帮大家看,并一一点评。《启舰:春招在即,义务帮大家看看简历吧》 一石激起千层浪,三天收到两百多封简历。 花光了两个星期的所有空闲时...

《经典算法案例》01-08:如何使用质数设计扫雷(Minesweeper)游戏

我们都玩过Windows操作系统中的经典游戏扫雷(Minesweeper),如果把质数当作一颗雷,那么,表格中红色的数字哪些是雷(质数)?您能找出多少个呢?文中用列表的方式罗列了10000以内的自然数、质数(素数),6的倍数等,方便大家观察质数的分布规律及特性,以便对算法求解有指导意义。另外,判断质数是初学算法,理解算法重要性的一个非常好的案例。

《Oracle Java SE编程自学与面试指南》最佳学习路线图(2020最新版)

正确选择比瞎努力更重要!

一文带你入门Java Stream流,太强了

两个星期以前,就有读者强烈要求我写一篇 Java Stream 流的文章,我说市面上不是已经有很多了吗,结果你猜他怎么说:“就想看你写的啊!”你看你看,多么苍白的喜欢啊。那就“勉为其难”写一篇吧,嘻嘻。 单从“Stream”这个单词上来看,它似乎和 java.io 包下的 InputStream 和 OutputStream 有些关系。实际上呢,没毛关系。Java 8 新增的 Stream 是为...

都前后端分离了,咱就别做页面跳转了!统统 JSON 交互

文章目录1. 无状态登录1.1 什么是有状态1.2 什么是无状态1.3 如何实现无状态1.4 各自优缺点2. 登录交互2.1 前后端分离的数据交互2.2 登录成功2.3 登录失败3. 未认证处理方案4. 注销登录 这是本系列的第四篇,有小伙伴找不到之前文章,松哥给大家列一个索引出来: 挖一个大坑,Spring Security 开搞! 松哥手把手带你入门 Spring Security,别再问密...

立即提问
相关内容推荐